Headings

In HTML headings are provided on levels, so that <h1> represents the first level heading while h2, h3, h4, etc. are smaller level headings:

Try the following example:

The result will be something like:

Notice how each level differs in size.  Now run the following example:

   
<!doctype html>   
<html>
<head>
    <title>My  Learning Plan</title>
</head>
<body>
    <h1>My Heading 1</h1>
    <h2>My Heading 2</h2>
    <h3>My Heading 3</h3>
    <h4>My Heading 4</h4>
    <h5>My Heading 5</h5>
    <h6>My Heading 6</h6>
</body>
</html> 

 

The result will be something like:

Notes:

  • Headings are important to show the main topics in the web page.
  • Headings are also important for search engines to index the contents in your pages.