Class – 05 | Headings in HTML | HTML Tutorial

Paragraphs in HTML - Class - 5
Paragraphs in HTML – Class – 5

Headings in HTML are used to create headings and subheadings on a web page. There are six levels of headings in HTML, from H1 to H6, with H1 being the largest and most important heading and H6 being the smallest.

Here’s how to use headings in HTML:

<h1>This is a Heading 1</h1>
<h2>This is a Heading 2</h2>
<h3>This is a Heading 3</h3>
<h4>This is a Heading 4</h4>
<h5>This is a Heading 5</h5>
<h6>This is a Heading 6</h6>

It’s vital to use headings correctly in HTML to improve the accessibility and SEO of a website. The headings should be used logically, with H1 being the page’s main heading and H2 being used for subheadings under H1, and so on.

Additionally, CSS can style the headings, such as changing the font size, color, and other properties.

h1 {
  font-size: 36px;
  color: blue;
}

Next Class

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top