HTML HTML title basis ---

In an HTML document, the title is very important.

 

A, HTML title

<H6> tag defining the like - title (the Heading) by <h1>.

<H1> defines the maximum title. Minimum title <h6> defined.

 

<h1 align="center">This is a Heading</h1>
<h2>This is a Heading</h2>
<h3>This is a Heading</h3>

 

<html>

<body>

<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>

<p>Please only the title tag for the title text. Not just to produce bold text and use them. Please use other tags or CSS instead. </ P > 

</ body > 
</ HTML >

 

 

The browser will automatically add a blank line before and after the title

By default, HTML automatically adds an extra blank line before and after the block-level element, such as a paragraph, title element before and after

 

Second, it is important title

 

Make sure that the HTML heading tags as long as in the title, not just to produce bold text or use the title of queen.

Search engines use the title to the structure and content of your pages indexed.

Because users can quickly browse through your page title, so use the title to present the document structure is very important.

H1 should be used as the main title (the most important), followed by h2 (less important), then followed by h3, and so on.

 

Three, HTML horizontal line

 

<Hr /> tag creates a horizontal line in an HTML page.

hr element can be used to separate content.

Examples

<p>Welcome to HTML programming World</p>

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

 

< HTML > 

< body > 
< P > HR tag defines the horizontal line: </ P > 
< HR /> 
< P > This is a paragraph. </ P > 
< HR /> 
< P > This is a paragraph. </ P > 
< HR /> 
< P > This is a paragraph. </ P > 
</ body > 
</ HTML >

 

 

Tip: Use horizontal lines (<hr> tag) to separate the section of the article is a way (but not the only way).

 

Four, HTML comments

 

Comments can be inserted into the HTML code, this can improve readability, make the code more easily understood. Comments are ignored by the browser, it will not display them.

Comments are written like this:

Example:

 

<!-- This is a comment -->

 

<! DOCTYPE HTML > 
< HTML > 

< body > 

<-! This is a comment. Comments are not displayed in the browser. -> 

< P > This is a normal paragraph. </ P > 

</ body > 
</ HTML >

 

Notes: After the start of brackets (on the left in parentheses) followed by an exclamation mark required before the closing bracket (parenthesis on the right) is not required.

 

Tip: rational use of comments can help generate the code for future editing.

 

Five, HTML Tip - How to View Source Code

 

If you want to find the mystery, only need to right-click and select "View Source" (IE) or "View Page Source" (Firefox), other browsers practice is similar. Doing so will open a window containing the HTML code page.

 

Six, HTML Tag Reference

Guess you like

Origin www.cnblogs.com/Tomorrow-will-be-better/p/11129976.html