HTML Title


In HTML Document, Title is Important.


HTML Title

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

<h1> Defines the largest title. <h6> Defines the smallest title.

Example

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

Try it »

Comment:Browsers automatically add blank lines before and after titles.


Title is Important

Ensure that the HTML Title tags are only used for titles. Do not use them solely for generatingboldorlargetext.

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

Because users can quickly browse your web pages using titles, it is important to present the document structure using titles.

Should h1 be used as the main title (the most important), followed by h2 (the second most important), and so on.


HTML Horizontal Line

<hr> tag creates a horizontal line in HTML pages.

hr element is used to separate content.

Example

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

Try it »


HTML Comment

You can insert comments in HTML code to improve readability and make the code more understandable. Browsers ignore comments and do not display them.

Comment writing format:

Example

<!--This is a comment-->

Try it »

Comment:After the left parenthesis (the left bracket), a semicolon should be followed by a question mark.!(English punctuation mark), no question mark is needed before the right parenthesis (the right bracket).


HTML Tip - How to View Source Code

Have you ever seen a webpage and wondered how it was created?

If you want to find the secret, just click the right mouse button and select "View Source File" (IE) or "View Page Source Code" (Firefox), and the same is true for other browsers. This will open a window containing the HTML code of the page.


Examples

Site Examples

Title
How to Display Titles in HTML Document

Hide Comments
How to Insert Comments in HTML Source Code.

Horizontal Line
How to Insert Horizontal Line.


HTML Tag Reference Manual

The tag reference manual provided by the tutorial contains more information about these titles and their attributes.

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

Tag Description
<html> Define HTML Document
<body> Define the main body of the document
<h1> - <h6> Define HTML Title
<hr> Define Horizontal Line
<!--...--> Define Comment
Other Extensions