codescracker


html

HTML Headings



« Previous Tutorial Next Tutorial »


You can use heading to give a topic, sub-topic, before writing some content in an HTML document.

Headings are basically the main phrases of the documents. There are 6 levels of headings. The first level is defined with <h1> and the last level is defined with <h6>.

HTML Heading Example

Here is an example of HTML heading.

<!DOCTYPE html>
<html>
<head>
	<title>HTML Heading Example</title>
</head>
<body>

<h1>This is Heading (Most Important)</h1>
<h2>This is Heading</h2>
<h3>This is Heading</h3>
<h4>This is Heading</h4>
<h5>This is Heading</h5>
<h6>This is Heading (Least Important)</h6>

</body>
</html>

Here is the output produced by the above HTML heading example code:

HTML Headings Example

Here is another example shows how to given a heading to a content in an HTML document.

<!DOCTYPE html>
<html>
<head>
	<title>HTML Heading Example</title>
</head>
<body>

<h1>HTML Heading</h1>
<p>Heading is the main text of a web page. You can also give
sub-heading before writing about sub-heading.</p>

</body>
</html>

Here is the sample output displayed by the above HTML heading example:

html heading

To learn more about head and heading tags, refer to HTML Head and Heading Tags tutorial.


« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test