Basic structure of HTML base HTML
Formatting of HTML tags
(1) < tag name > single type, no set value.
such as:<br>
(2) < tag name attribute = "attribute value" > single type, with set value.
such as:
(3) < tag name >...</tag name > symmetric type, no set value.
such as:<title>...</title>
(4) < tag name attribute = "attribute value" >...</tag name > symmetric type, with set value.
such as: <body bgcolor= "Red" >...</body>
<font size= "7" >...</font>
Common Page Header Markers
Table 1 Page Header markers
<title>
<link>
Tag |
function |
File Title declaration |
<meta> |
Provides meta-information about an HTML element , such as a description, Keywords for search engines and refresh frequency |
<base> |
page of the link address datum reference point, the role of the label includes <a>, , <link>, <form> tags in the URL |
<script> |
JavaScript script |
<style> |
Set layout, create CSS style |
can refer to external files such as. css style files |
Common page Markers (1) <body> page body tags
Role: The start tag of the page content display, setting page properties.
Format: <body bgcolor= "" text= "" >...</body>
Property name |
Property value |
Description |
BgColor |
How colors are represented |
Set Page background color |
Background |
Picture location information |
Set Page background pattern |
Text |
How colors are represented |
Set Page text color |
Three ways to express color: 6-bit hex code, color of English keywords, RGB (r,g,b)
(2) Title tag
L
L
L
L
L
L
Property Name Property Value Description
Align Left.
Center on the Middle
Right.
(3) line break <br> mark
Action: Force line break
Format:<br>-----Single Mark
(4) Paragraph <p> mark
To represent a paragraph in a page:
Format: <p align= "arrangement mode" >...</p>
Property Name Property Value Description
Align Left (default)
Center toward the Middle
Right, lean.
(5) Horizontal
Effect: Inserts a horizontal line in the page.
Format:
Property Name Property Value Description
Size pixel absolute setting, expressed as a number, the larger the value of the property, the thicker the line
Percent relative set, in%, the greater the value of the property, the thicker the line
Width pixel absolute setting, length does not change as the window changes
Percent relative set, length varies with window width
NoShade Solid Line
(6) Special characters (learn)
Format:<à< >à>
&à& "à"
(7) Add comments
Role: Add comments to HTML pages
Format:<!--...-->
Instance:
(8) Entity character Control mark (learn)
1.<b>...</b> Coarse
2.<i>...</i> Oblique
3.<s>...</s> Delete
4.<u>...</u> Next row
5.<tt>...</tt> Telegram
6.<sub>...</sub> subscript
7.<sup>...</sup> superscript
(9) Semantic character control (learn)
1.<address>...</address> Address
2.<big>...</big> characters
3.<del>...</del> Delete
4.<small>...</small> small Print
5.<strong>...</strong> strengthening tone (bold)
6.<em>...</em> reinforcement tone (tilt)
(ten) <font> font control
Format:<font>...</font>
Property Name Property Value Description
Size 0-7 Font sizes
Color Color Representation Colors
Face Font Font
(11) Formatting
Function: Preserves the original writing format
Format:<pre> label inside what format page is displayed on what format! </pre>
Instance:
HTML Training course-------DAY01 (HTML basic Element)