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

Chapter 4. CSS Selectors > DIV and SPAN

DIV and SPAN

Before we discuss the advanced selectors, we must talk about two HTML elements. DIV (division) and SPAN (a span of words) have been added to HTML partly to support style sheets. We delayed describing them until now because they are mostly used in combination with the CLASS attribute.

The CLASS attribute is a powerful feature of CSS. Using it, you can, in effect, create new elements in HTML. Creating new elements through the CLASS attribute is much easier than convincing browser vendors and maintainers of the HTML specification that a new tag is needed and beneficial for everyone.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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