Advertisement

Advertisement


HTML Heading

HTML Heading Tag

Heading tag is used to give headings of particular sizes in a document. There are six different HTML heading tags, which gives different heading sizes and are defined by <h1> to <h6> tags.

<h1> gives the largest heading and <h6> gives the smallest one. So <h1> can be used for most important headings and <h6> can be used for least important one.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Heading Tag </title>
</head>
<body>
<h1> This is Heading 1 </h1>
<h2> This is Heading 2 </h2>
<h3> This is Heading 3 </h3>
<h4> This is Heading 4 </h4>
<h5> This is Heading 5 </h5>
<h6> This is Heading 6 </h6>
</body>
</html>

Output

HTML Heading Example

This is Heading 1

This is Heading 2

This is Heading 3

This is Heading 4

This is Heading 5
This is Heading 6

Heading Size

You can change the size of Heading by using font-size property.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Heading Tag </title>
</head>
<body>
<h1 style="font-size:50px;">Heading 1</h1>
<p>You can change the size of a heading with the style attribute, using the font-size property.</p>
</body>
</html>

Output

HTML Heading Tag Style Example

Heading 1

You can change the size of a heading with the style attribute, using the font-size property.


HTML Head Element

The HTML Head used to contain metadata. HTML metadata is all about html document and this data is not displayed anymore. The <Head> element placed between the <HTML> tag nad <body> Tag.

You can add Style or JavaScript between head tags and make you web page more interactive.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML HEAD </title>
<meta charset="UTF-8">
</head>
<body>
.....
.....
</body>
</html>









Become a Patron!

Note: If the updated content is not visible to you please refresh the cookies by pressing CTRL + Shift + R.