Syntax of HTML Heading Tags

Rules for coding heading elements in HTML 5
<body>
   ... flow content expected ...
   <hn>... phrasing content ...</hn>
   ... flow content expected ...
   <hgroup>
      <hn>... phrasing content ...</hn>
   </hgroup>
   ...
</body>
  1. Inside an element where flow content is allowed, code one or more optional HTML heading (hn) elements.
  2. Begin each heading element with a starting <hn> tag with a number between 1 and 6 following the letter h. The h in the element name is lower case and the element name should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any HTML global attributes on the heading tag as appropriate.
  4. End the heading element with a matching </hn> closing tag.
  5. Inside the heading element, code the appropriate flow content.

<aside> Content Model

Content of the <aside> Tag

The inner HTML of HTML heading elements is restricted to HTML comments, text content and only the tags that are allowed in phrasing content: