HTML Title

In HTML documents, the title is very important.

HTML Title

Heading is defined by <h1>-<h6> tags.

<h1> defines the largest headline. <h6> Define the smallest heading.


<h1>This is a headline.</h1>
<h2>This is a headline.</h2>
<h3>This is a headline.</h3>

Try It!

Note: The browser will automatically add blank lines before and after the title.

Title is Important

Make sure to use HTML title tags only for titles. Don’t use headings just to generate bold or large text.

Search engines use headings to index the structure and content of your web pages.

Because users can quickly browse your web pages by headings, it is important to use headings to present the structure of the document.

You should use h1 as the main heading (the most important), then h2 (the second most important), then h3, and so on.

HTML Horizontal Line

The <hr> tag creates a horizontal line in the HTML page.

The hr element can be used to separate content.


<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>

Try It!

HTML Comments

You can insert comments into the HTML code, which can improve its readability and make the code easier to understand. The browser will ignore the comments and will not display them.

The comment is written as follows:


<!-- This is a comment -->

Try It!

Note: An exclamation mark is required immediately after the opening parenthesis (the parenthesis on the left), and it is not required before the closing parenthesis (the parenthesis on the right). Reasonable use of comments can help future code editing work.

HTML Tips - How to View The Source Code

Have you seen some web pages and then marveled at how it is implemented.

If you want to find the mystery, just right-click and select "View Source File" (IE) or "View Page Source Code" (Firefox). Other browsers do the same. Doing so will open a window containing the HTML code of the page.


Examples of This Site


How to display the title in the HTML document.

Hide comments
How to insert comments in HTML source code.

how to insert a horizontal line.

HTML Tag Reference Manual

The label reference manual of the tutorial provides more information about these titles and their attributes.

You will learn more about HTML tags and attributes in the following chapters of this tutorial.

<html>Define HTML document
<body>Define the body of the document
<h1> - <h6>Define HTML title
<hr>Define the horizontal line
<!--...-->Define comments