Contact Our Development Team
Free Code Tutorials & Open Source Code
Headings
Tutorials > HTML > Headings
Headings
Along with paragraphs, HTML provides a number of automatic stylings for headings (titles and subtitles). There are six of these, which range in size from 1 being the largest and 6 being the smallest.
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
As you can see, the browser automatically adds a line break before and after each heading, just like with the <p> element, and by combining these two you can easily make readable documents to publish online. Like all HTML elements, there are a number of attributes which can be added to heading elements to change their style, which you will learn more about when you start adding CSS to your pages.
Page Responses
Currently there have been no responses to this page...
If you have anything to contribute to this tutorial, found a bug, or know a better way of achieving the same goal, please leave your response below.
     
Copyright ©2009, Wired IDS Ltd. | Licensed under Creative Commons Attribution Share-Alike | Load time: 0.2956 seconds