×

Headings and Subheadings [2/17]

To outline structure of large texts we use headings. In text editors, you can select a part of your text, choose a Heading of a given level from a menu and apply it to your selection.

In HTML, a family of tags is used to make headings, ranging from <h1> through <h6>. <h1> designates the most important (top-level) heading, while <h6> specifies the lowest heading level.

However, for all practical means headings of level 1 to 3 usually suffice. So the most widely used heading tags are: <h1>, <h2> and <h3>.

Please keep in mind that search engines put special importance on headings, so you should learn how to use them properly.


Do it
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Headings and Subheadings</title> </head> <body> 1 Headings <p>Headings are core to structuring your text.</p> 1.1 How to use headings <p>Here are some guidelines on headings in an HTML page.</p> 1.1.1 Using H1 <p>There should be one top-level heading on a page.</p> 1.1.2 Using H2-H6 <p>If you have subheadings, make sure not to skip their levels; so, H1 should be followed by H2 and only then by H3.</p> </body> </html>
CSS
HTML Academy
  1. Wrap "1 Headings" by h1.
  2. Put "1.1 How to use headings" inside h2.
  3. Use h3 tags to wrap "1.1.1 Using H1" and "1.1.2 Using H2-H6".
Theory Check Next