If you find this helpful, please click the Google Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.) |
Flow Content vs. Phrasing Content
Within the body section of an HTML document, most non-empty HTML elements that do not expect content consisting of specific child elements will expect one of two different categories of content:
- flow content
- The body element, which is the beginning of the visible content of the document, expects content that consists of flow content. Flow content is less restrictive than phrasing content because sectioning tags, heading and footer tags as well as text and the HTML tags that can be used in phrasing content can be used where flow content is permitted.
- phrasing content
- Phrasing content is the content at the lower level that consists of text and HTML elements that mark up the text within paragraphs. Phrasing content is more restrictive than flow content, since there are many tags, such as block tags, that are not permitted in phrasing content.
Some tags that appear similar at first glance may expect different content models. For example, considering the two types of child elements of the dl element:
- the inner HTML of a dd element for a definition description can be any flow content, but
- the inner HTML of a dt element for a definition term is restricted to phrasing content only
Therefore, a dt element in a definition list should not contain any block tags such as a <p> paragraph tag or <hr/> tag.
List of HTML tags by category
The category of an HTML tag indicates where the tag can be used.
HTML Content - Category: none
SGML Declarations and HTML Elements Used Only In Specific Locations
HTML Content - Category: Metadata Content
HTML Metadata Elements
Elements restricted for use only where metadata content is allowed
These HTML elements can be used only where metadata content is allowed, such as in the content of a head element.
- <base/>
- <command/>
- <link rel="..."/>
- <meta http-equiv="..." .../>
- <meta name="..." .../>
- <noscript>... metadata content ...</noscript>
- <script>
- <style>
- <title>
HTML Content - Category: Flow Content
Flow content in HTML is made up of flow elements, phrasing content and text content, possibly interspersed with HTML comments and/or white space.
HTML Flow Elements
Elements restricted for use only where flow content is allowed
These HTML elements can be used only in HTML code where flow content is allowed, with some additional restrictions in specific cases. In addition, text and HTML elements categorized as phrasing content can also be used where flow content is expected.
- <a href="...">... flow content ...</a>
- <address>
- <article>
- <aside>
- <blockquote>
- <canvas>
- <del>... flow content ...</del>
- <details>
- <div>
- <dl>
- <fieldset>
- <figure>
- <footer>
- <form>
- <hn> heading tags
- <header>
- <hgroup>
- <hr/>
- <ins>... flow content ...</ins>
- <map>... flow content ...</map>
- <menu>
- <nav>
- <noscript>... flow content ...</noscript>
- <ol>
- <p>
- <pre>
- <section>
- <table>
- <ul>
HTML Content - Category: Phrasing Content
Can be used where either flow content or phrasing content is expected
Phrasing content in HTML is made up of text content, embedded content elements and phrasing elements, possibly interspersed with HTML comments and/or white space.
These HTML elements are allowed to be used in HTML code where either flow content is expected or phrasing content is expected, with some possible restrictions in specific cases.
HTML Embedded Content Elements
HTML Phrasing Elements
- <a href="...">... phrasing content ...</a>
- <abbr>
- <b>
- <bdi>
- <bdo>
- <br/>
- <button>
- <cite>
- <code>
- <command/>
- <datalist>
- <del>... phrasing content ...</del>
- <device/>
- <dfn>
- <em>
- <i>
- <input>
- <ins>... phrasing content ...</ins>
- <kbd>
- <keygen/>
- <label>
- <link itemprop="..." .../>
- <mark>
- <map>... phrasing content ...</map>
- <map><area/>...</map>
- <meta itemprop="..." .../>
- <meter>
- <noscript>... phrasing content ...</noscript>
- <output>
- <progress>
- <p>
- <ruby>
- <s>
- <samp>
- <script>
- <select>
- <small>
- <span>
- <strong>
- <sub>
- <sup>
- <textarea>
- <time>
- <u>
- <var>
- <wbr/>
Content Models
List of HTML tags by content model
The content model of an HTML element specifies what HTML code can appear inside the element.
HTML Elements - Content Model: Void
These HTML elements are not allowed to have any content, not even HTML comments and therefore are coded using the self-closing standalone tag syntax (ending with the delimiter string />
rather than just >
).
- <area/>
- <base/>
- <br/>
- <col/>
- <command/>
- <device/>
- <embed/>
- <hr/>
- <img/>
- <input>
- <keygen/>
- <link/>
- <meta/>
- <param/>
- <source/>
- <wbr/>
HTML Elements - Content Model: Empty
These HTML elements expect content consisting of nothing other than possibly HTML comments and white space.
HTML Elements - Content Model: Text Content
These HTML elements expect content consisting of nothing other than text and possibly HTML comments and white space.
HTML Elements - Content Model: Transparent Content
The inner HTML of these HTML elements can include flow content elements when used where flow content is allowed but is restricted to phrasing content when used where phrasing content is expected. In some cases, these elements can even contain metadata content when used where metadata content is expected.
HTML Elements - Content Model: Metadata Content
These HTML elements expect content consisting of metadata content.
HTML Elements - Content Model: Flow Content
These HTML elements expect content consisting of flow content or have a transparent content model that allows flow content when used where flow content is allowed.
- <a href="..."> in flow content
- <address>
- <article>
- <aside>
- <audio> in flow content
- <blockquote>
- <body>
- <canvas> in flow content
- <del> in flow content
- <details>
- <div>
- <dl>
- <fieldset>
- <figure>
- <footer>
- <form>
- <header>
- <ins> in flow content
- <map> in flow content
- <menu>
- <nav>
- <noscript> in flow content
- <object> in flow content
- <ol>
- <p>
- <pre>
- <section>
- <table>
- <ul>
- <video> in flow content
HTML Elements - Content Model: Phrasing Content
These HTML elements restrict the inner HTML of the element to phrasing content or have a transparent content model that is restricted to phrasing content when used where phrasing content is expected.
- <a href="...">... phrasing content ...</a>
- <abbr>
- <audio>... phrasing content ...</audio>
- <b>
- <bdi>
- <bdo>
- <button>
- <canvas>... phrasing content ...</canvas>
- <cite>
- <code>
- <del>... phrasing content ...</del>
- <datalist>
- <dfn>
- <em>
- <hn> heading tags
- <i>
- <ins>... phrasing content ...</ins>
- <kbd>
- <label>
- <mark>
- <map>... phrasing content ...</map>
- <math>
- <meter>
- <noscript>... phrasing content ...</noscript>
- <object>... phrasing content ...</object>
- <output>
- <progress>
- <p>
- <ruby>
- <s>
- <samp>
- <script>
- <select>
- <small>
- <span>
- <strong>
- <sub>
- <sup>
- <svg>
- <textarea>
- <time>
- <u>
- <var>
- <video>... phrasing content ...</video>