HTML Title
In HTML documents, titles are important.
HTML Title
Heading is defined by <h1> – <h6> tags.
<h1> defines the largest heading. <h6> defines the smallest heading.
<h1>this is a title.</h1>
<h2>this is a title.</h2>
<h3>this is a title.</h3>
Note: Browsers will automatically add blank lines before and after titles.
Titles are important
Be sure to use HTML title tags for titles only. Do not use titles simply to make text bold or large .
Search engines use titles to index the structure and content of your web pages.
Because headings are used by users to quickly scan your web pages, it is important to use headings to present the document structure.
You should use h1 as the main heading (the most important), followed by h2 (the next most important), then h3, and so on.
HTML Horizontal Rule
The <hr> tag creates a horizontal rule in an 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
You can insert comments into HTML code to improve its readability and make the code easier to understand. Browsers ignore comments and do not display them.
The annotations are written as follows:
<!--This is a comment-->
Note: An exclamation mark
! (punctuation mark) is required after the opening bracket (the left bracket
), but not before the closing bracket (the right bracket). Proper use of comments can help with future code editing.
HTML Tips – How to view source code
Have you ever looked at some web page and marveled at how it was done?
If you want to find out, just right-click and select “View Source” (IE) or “View Page Source” (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page.
This site example
Title
How to display a title in an HTML document.
Hide Comments
How to insert comments in HTML source code.
Horizontal Line
How to insert a horizontal line.
HTML Tag Reference
The Tutorial’s Tag Reference provides more information about these headers and their properties.
You will learn more about HTML tags and attributes in the following chapters of this tutorial.
Tag | Description |
---|---|
<html> | Define the HTML document |
<body> | Defines the body of the document |
<h1> – <h6> | Define the HTML header |
<hr> | Defines a horizontal line |
<!–…–> | Define the comments |
IT Resource Hub » HTML Title