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

Chapter 10. Formatting Text > <div> and <span>

10.4. <div> and <span>

The HTML specification provides two generic tags, <div> and <span>, that can be used to structure and label the contents of a web document.

The <div> tag divides a document into distinct sections (or divisions). It is a block-level element, which means that when you introduce a <div> tag, the enclosed content begins on a new line and space may be added above and below. The <span> tag is an inline element that can be applied to a string of text within a paragraph or other content flow. It does not introduce a line break.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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