HTML Title


In HTML documents, headings are important.


HTML title

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

<h1> defines the largest heading. <h6> defines a minimal heading.

example

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

Note: Browsers automatically add blank lines before and after headings.


title matters

Make sure to use HTML title tags for titles only. 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.

It’s important to use headings to present the structure of your document because users can quickly navigate your web pages with headings.

You should use h1 as the main heading (most important), followed by h2 (less important), followed by h3, and so on.


HTML horizontal line

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

The hr element can be used to separate content.

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

HTML comments

Comments can be inserted into HTML code to improve its readability and make the code easier to understand. Browsers ignore comments and don’t display them.

Notes are written as follows:

Example

<!-- This is a comment -->

Comments: An exclamation mark ! (English punctuation mark) is required after the opening parenthesis (the left parenthesis), and is not required before the closing parenthesis (the right parenthesis). Reasonable use of comments can help future code editing work.


HTML Tips – How to View Source Code

Have you ever looked at some web pages and marveled at how it was implemented.

If you want to find the mystery, just right-click and choose “View Source” (IE) or “View Page Source” (Firefox), other browsers do the same. Doing so will open a window containing the HTML code for the page.


HTML Tag Reference Manual

The TutorialsByte Tag Reference Manual provides more information on these headers and their properties.

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

LabelDescribe
<html>Define HTML documents
<body>define the body of the document
<h1> – <h6>Define HTML title
<hr>define horizontal line
<!–…–>define annotations