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

Chapter 13. Introducing CSS > Styles and Spans

Styles and Spans

The <div> tag is very useful, but it has a sometimes-unpleasant side effect: it forces a line break before and after the tag. Sometimes you want to have a style apply to just a part of the text, not to an entire block. In this case, you want to use the <span> tag instead, as shown in Script 13.6 and Figures 13.7 and 13.8.

Figure 13.7. Modern browsers display <span> tags correctly.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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