Heading

Category:HTML Tags

Heading

This tag is used to create different sized section titles throughout a web page. The <h1> through <h6> tags are used to create headings on a page, where <h1> is the largest and <h6> is the smallest.

Examples

Largest and smallest headings

Using <h1> and <h6> tags to create the largest and smallest headings.

<h1>This heading is the largest in terms of font size.</h1>
<h6>This heading is the smallest in terms of font size.</h6>

Tile and subtitle

Using <h1> and <h2> to create a title and a subtitle.

<h1>Choosing a Pet</h1>
<p>This page will help you choose between a dog, turtle, or a bird</p>
<h2>Dogs</h2>
<p>Dogs are the most work, but they are also the most fun.  You have to walk them every day, but they love you and will always play with you.</p>

Syntax

<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>

Tips

  • There are different sized headings which are marked by the number in the heading tag. They go from <h1> to <h6>.
  • The <h1> tag is the largest font size.
  • The <h6> tag is the smallest font size.

Additional Information

For more information, see http://www.w3schools.com/tags/tag_hn.asp

Found a bug in the documentation? Let us know at documentation@code.org