Easy Tutorial
❮ Att Th Colspan Html Colorpicker ❯

HTML Title


In HTML documents, titles are important.


HTML Headings

Headings are defined with the <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading.

Example

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

Note: Browsers automatically add a blank line before and after a heading.


The Importance of Headings

Ensure that you use HTML heading tags only for headings. Do not use headings to create bold or large text.

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

Since users can quickly browse your pages via headings, it's important to use headings to display the document structure.

<h1> should be used for the main heading (most important), followed by <h2> (less important), then <h3>, and so on.


HTML Horizontal Lines

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

The 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>

HTML Comments

You can insert comments into HTML code to improve readability and make the code easier to understand. Browsers ignore comments and do not display them.

Comments are written as follows:

Example

<!-- This is a comment -->

Note: The opening bracket (left bracket) should be immediately followed by an exclamation mark ! (English punctuation), and no characters should precede the closing bracket (right bracket). Proper use of comments can aid future code editing efforts.


HTML Tip - How to View Source Code

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

If you want to uncover the mystery, simply right-click and select "View Source" (IE) or "View Page Source" (Firefox). Other browsers have similar actions. This will open a window containing the HTML code of the page.


Live Examples

Headings

Hidden Comments

Horizontal Lines


HTML Tag Reference

The tag reference manual on tutorialpro.org provides more information about these headings and their attributes.

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

Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> - <h6> Defines HTML headings
<hr> Defines a horizontal line
<!--...--> Defines a comment
❮ Att Th Colspan Html Colorpicker ❯