HTML Content Models - jpjohnsonjr/learning-notes GitHub Wiki

About Content Models

Traditionally, there were two different types of elements in HTML:

  • Block-level Elements - Render to begin on a new line (by default); may contain inline or other block-level elements
  • Inline Elements - Render on the same line (by default); may only contain other inline elements - no block-level elements

HTML5 replaces these with more complex categories. Block-level roughly corresponds to the HTML5 Flow Content category (<div> tags). Inline roughly corresponds to the HTML5 Phrasing Content category (<span> tags).

Overall, W3C now defines seven kinds of content:

  • Metadata content
  • Flow content
  • Sectioning content
  • Heading content
  • Phrasing content
  • Embedded content
  • Interactive content

Learn more

⚠️ **GitHub.com Fallback** ⚠️