Heading tag in HTML

Heading tag is often used to specify heading to on the page. h1 to h6 tags are used to create headings. Each heading will appear on separate lines.

Heading tag in HTML

Heading tag is often used to specify heading to on the page. <h1> to <h6> tags are used to create headings. Each heading will appear on separate lines.  You will notice that all headings will appear in bold text with a different font size.

Creating headings

<!DOCTYPE html>
<html>
    <title>HTML Page</title>
<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>
</html>

Output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

You can change the appearance of heading tag using CSS.


Share Tweet Send
Loading...