• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Using Cascading Style Sheets > Styles, Style Sheets, and Where They...

Styles, Style Sheets, and Where They’re Kept

Styles can exist in a document as individual styles placed inline with the document, or they can be grouped together in collections called style sheets. A style sheet can be internal or external, depending on where it is stored relative to the document that it’s formatting. The following sections discuss the relative advantages and disadvantages of inline styles, internal style sheets, and external style sheets.

Inline Styles

Inline styles are those defined directly within the tag on the page. The CSS is written right into the tag as an attribute. Although this style will take precedence over all other styles, they are applied only on a tag-by-tag basis. Therefore they can be edited only by directly editing the HTML page. Imagine though, having to edit a page with 50 inline CSS references on it; it would be time-consuming and also take more bandwidth to serve your page. This way of applying a style is limited and therefore should be used for changing specific tags on a case-by-case basis.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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