HTML Headings

44
views
html headings

1HTML heading tags

Headings are the most important part of your content. It not only organizes your content but also helps search engines to understand your content is a systematic manner. There are six types of headings you can use in your content-

2Importance of headings

  • h1 defines the most important heading and h6 defines the least important heading.
  • Search engines use the heading tags to understand the content of your web page and index it correctly.
  • h1 headings should be used for main headings, followed by h2 headings, then the less important h3, and so on.

3HTML Headings Structure

  • Try not to use more than one h1 in your content. It should be the main title.
  • Try not to use bigger headings inside small headings.

If you will follow these two tips then your content structure might look like as shown.

4Default CSS for headings

  • Browser have some default CSS styling for heading tags.
  • Browsers automatically add some space (called margin) before and after a heading.
  • h1 is rendered in biggest size and h6 in smallest.
  • You can always change the styles using custom CSS.

5Styling HTML headings

You can use inline CSS to specify size and other styles to the heading.

Note: HTML inline styling is not recommended. Its always good to create a external CSS file and attach to the head section the html document. (Explained later)

LEAVE A REPLY

Please enter your comment!
Please enter your name here