■ File tags
<HTML> ; <HEAD> ; <TITLE> ; <BODY>
To understand the tag classification of this article [HTML Thorough Analysis], please see [Tags List].
Please also first understand the difference between containment tags and empty tags, please see [HTML Concepts].
■ Basic structure of HTML:
The following HTML Source Code is the basic structure of an HTML document:
<HTML> <HEAD> - <TITLE> The title of the web page</TITLE>
</HEAD> <BODY> - The content of the web page, many tags are used here
</BODY> </HTML>
|
Feature explanation:
- The entire document is between the tags <HTML> and </HTML>.
<HTML> is used to declare that this is an HTML file, allowing the browser to recognize and correctly process this HTML file. - The document is divided into two parts, <HEAD> to </HEAD> are called the beginning , and <BODY> to </BODY> are called the text .
Basically, both have applicable tags. For example, <TITLE> can only appear in the opening part. - The beginning part is used to store important information, and only the text part will be displayed.
So most of the markup will apply to this article section. - <TITLE> indicates the title of the file.
It will appear at the top of the browser and is the name when Bookmarked by others, so each page needs to have a different clear title.
Among the above tags, only <BODY> has parameter settings.
■ Parameter setting of <BODY>:
Example:
<BODY text ="#000000" link ="#0000FF" alink ="#FF0000" vlink ="#0000FF" background ="bg1.gif" bgcolor ="#FFFFFF" leftmargin =2 topmargin =2 bgproperties ="fixed">
- text ="#000000"
Used to set text color. #000000 represents black, and you can also use a color name, that is, text=" black ". For the values and names of various colors, please refer to the section [Color Adjustment Principles]. - link ="#0000FF"
Set the color of general text links. - alink ="#FF0000"
Sets the text link color when first clicked. - vlink ="#0000FF"
Set the color of the link after being clicked. - background ="bg1.gif"
Set background image. Either GIF or JPEG is acceptable, and the path can be absolute or relative. - bgcolor ="#FFFFFF"
Setting the background color will have no effect when the background image has been set, except for the transparent part. - leftmargin =2
Set the left edge space of the entire document display screen, in pixels. (only for IE) - topmargin =2
Set the upper edge space of the entire document display screen. (only for IE) - bgproperties ="fixed"
Fixed background image so that it does not scroll when the scroll scrolls. (Applies to IE only)
Tags and parameters can be in either upper or lower case letters. For other events such as onload, please refer to the introduction to Java Script.
|