How to Add Heading to HTML Body Content - dummies

By David Karlins, Doug Sahlin

Headings on your web page belong between heading tags. These are elements that are used in order of your content structure — <h1>, <h2>, <h3>, and so on. The <h1> tag is for the main heading of your page, <h2> is for subheadings, and <h3> is for subheadings under the <h2> subheadings, and so on. You can see the progression here.

<title>Welcome to the Web Revolution</title>
<meta name="Keywords" content="web,Web Design,New York City"/>
<meta name="Description" content="The Web Collective designs Webs in New York City"/>
<link rel="stylesheet" href="style1.css" type="text/css"/>
<h1>About the Web Revolution</h1>
<p>This page tells the story of the Web Revolution</p>
<h2>Why the Web Collective?</h2>
<p>Because. . . someone has to do this!</p>
<h3>Who We are</h3>
<p>We are Manny, Moe, and Jack</p>
<h3>Where are We?</h3>
<p>We are located in the "big apple," New York city</p>

Even though HTML5 is often forgiving of unclosed tags, using closing tags does two important things:

  • Your code has a better chance of not misinterpreted in a browser.

  • You can better organize your own thinking: “Okay, now I’m done with the heading 2, that’s over and done with, and I’m on to something else.”