Easy Tutorial
❮ Html Media Html5 Serversentevents ❯

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 the HTML heading tags are used only for headings. Do not use headings just to make text bold or large.

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

Since users can quickly navigate your page through headings, it's important to use headings to display the document structure.

<h1> should be used for main headings (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

Comments can be inserted 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: After the opening bracket (left bracket), an exclamation mark ! (English punctuation) is required, and before the closing bracket (right bracket), it is not needed. Properly using comments can help future code editing work.


HTML Tip - How to View Source Code

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

If you want to find out, simply right-click and select "View Source" (IE) or "View Page Source" (Firefox), similar actions can be taken in other browsers. 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
❮ Html Media Html5 Serversentevents ❯