• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Checking the source

To get a look at the CSS of a page, use the View Source technique. To view the source code of a page in Internet Explorer, for example, you can either right‐click in your browser window and select View Source, or choose View⇨Source on your browser menu bar. (You can also view source with other browsers. The location of view source might be different but is found under a similar view‐type menu.) Look for a line of code in the <head> section of the page that refers to the CSS file or the actual CSS in the head of the file. If you find a reference to the CSS file, you can use your browser to view the file (more about that in a minute). CSS can also be applied within the document itself, but that method defeats one of the main strengths of CSS — the reusability of code that is kept in only one place.

You'll find it helpful to save the HTML code so you can play with it on your own. When you view the source, look for signs of CSS. Inline and embedded styles are easy to see. You can also get a look at external style sheets by looking for the path to the file in the head tag. Assuming the URL of the Web site is http://www.examplesite.com, the URL of the CSS would be http://www.examplesite.com/css/sitestyles.css. By typing the URL of the CSS into your browser window, you can view the CSS:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint