Html Headings


Html Headings : Html provides heading tags for adding headings in the html document.


Variability in Html Headings

There are following headings available in the html.

h1, h2, h3, h4, h5, h6

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>

<h1>H1 Heading</h1>
<h2>H2 Heading</h2>
<h3>H3 Heading</h3>
<h4>H4 Heading</h4>
<h5>H5 Heading</h5>
<h6>H6 Heading</h6>

</body>
</html>

Try it »

Outout

html headings examples

html headings examples

Heading Font Sizes

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<style type="text/css">
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.17em; }
h4 { font-size: 1.12em; }
h5 { font-size: .83em; }
h6 { font-size: .75em; }
</style>
</head>
<body>

<h1>H1 Heading</h1>
<h2>H2 Heading</h2>
<h3>H3 Heading</h3>
<h4>H4 Heading</h4>
<h5>H5 Heading</h5>
<h6>H6 Heading</h6>

</body>
</html>

Try it »



Advertisements

Add Comment

📖 Read More