HTML CSS IMAGES LINKS
 
HTML → Headings

In HTML, headings are used to generates text that varies in size, based on the number assigned to the tag. The numbers range from one through six where one generates the largest text size and six is the smallest. You create headings by "tagging" specific blocks of text with heading tags. The format for an HTML heading tag is:

<hN>Text to Appear in Your Heading</hN>

There are six levels of headings that you can use to structure text flow into a more readable, more manageable document. HTML defines these levels with the following tags: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.

Level 1 headings <h1> are the most prominent headings and level 6 headings <h6> are the least prominent.
Traditionally, web authors use <h1> headers for document titles, <h2> headers for section titles, etc. Headings are usually displayed in a bolder, larger font than normal body text.

Note: Headings are considered block elements and as such a heading tag will always start on a new line. All browsers display extra space before and after heading elements. Here is an example of the HTML code used to create all levels of headings:

<h1>Level 1 Heading</h1>

<h2>Level 2 Heading</h2>

<h3>Level 3 Heading</h3>

<h4>Level 4 Heading</h4>

<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>

Below is an example of how your web page should look.

Level 1 Heading

Level 2 Heading

Level 3 Heading

Level 4 Heading

Level 5 Heading

Level 6 Heading



 
  back ↑