HTML title


Release date:2024-02-02 Update date:2024-02-23 Editor:admin View counts:64

Label:

HTML title

In an HTML document, the title is important.

HTML title

The title (Heading) is passed through the <h1> - <h6> tag to define.

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

Example

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

Comment: the browser automatically adds blank lines before and after the title.

The title is important.

Be sure to use the HTML title tag for the title only. Don’t use headings just to generate bold or large text.

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

Because users can quickly browse your web page through the title, it is important to use the title to render the document structure.

H1 should be used as the main title (the most important), followed by H2 (the second most important), followed by H3, and so on.

HTML horizontal line

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

hr elements can be 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 comment

You can insert comments into your HTML code to improve its readability and make the code easier to understand. The browser ignores comments and does not display them.

The notes are written as follows:

Example

<!--This is a comment-->

Note: the opening parenthesis (the parenthesis on the left) needs to be followed by an exclamation point! (English punctuation), no need before closing parentheses (parentheses on the right), reasonable use of comments can be helpful for future code editing.

HTML hint-how to view the source code

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

If you want to find out the secret, just right-click and select View Source File (IE) or View Page Source Code (Firefox), and other browsers do the same. Doing so opens a window that contains the HTML code for the page.

Examples

An example of this site

Title

How to display the title in an HTML document.

Hidden Comment

How to insert comments in HTML source code.

Horizontal line

How to insert a horizontal line.

HTML tag reference manual

The label reference manual for the rookie tutorial provides more informationabout these titles and their attributes.

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

Label

Description

< html >

Define an HTML document

< body >

Define the body of the document

< H1 >-< h6 >

Define the HTML title

< hr >

Define horizontal Lin

<!–…–>

Define comment

Powered by TorCMS (https://github.com/bukun/TorCMS).