![]() |
VOOZH | about |
An HTML heading tag is used to define the headings of a page. There are six levels of headings defined by HTML. These 6 heading elements are H1, H2, H3, H4, H5, and H6; with H1 being the highest level and H6 the least.
In this article, we will discuss various heading elements used to add a heading in HTML.
Syntax:
<h1> Contents... </h1>
Importance of Heading:
Example 1: In this example, we will show different heading tags.
Output:
Example 2: This example explains the different HTML heading tags.
Output:
Changing the size of HTML Headings: The default size of HTML headings can be changed using the style attribute.
Example: This example explains the HTML heading tags by specifying the size of the font.
Output:
Horizontal rule: The <hr> tag which stands for the horizontal rule is used to define a thematic break in an HTML page. The <hr> tag is an empty tag, and it does not require an end tag. It is basically used to separate content. Please refer to the HTML <hr> tag article for further details.
Example: This example explains the HTML Headings with horizontal rules.
Output: