1.<html>...</html> tag
An HTML file, whether simple or complex, starts with <html> and ends with</html>. The <html> tag also points out that this file is an HTML file. When the browser encounters the <html> tag, the following text will be interpreted according to the HTML standard, and the above explanation will not be stopped until the end tag is encountered. Tip: HTML language is an interpreted language and does not need to be compiled. You can execute its code directly with a browser.
2.<head>...</head> tag
<head> and </head> constitute the beginning part of the HTML file. You can use <title>...</title>, <script>...</SCRIPT> and other tag pairs to describe the web page title or other information that is not displayed on the web page.
3.<title>...</title> tag
The <title> tag is used to set the slender text information in the title bar of the browser window, which is generally the theme of the web page. Note: <title></title> tag pairs can only be placed between <head></head> tag pairs.
4.<body>...</body> tag
<body></body> is the theme part of the HTML file, and multiple tags can be defined between them. At the same time, <body> also has many attributes, and the following are more commonly used. Properties of <body> directive
①Background color-- bgcolor <body bgcolor=color code>
② Background pattern-- background <body background=graphic file name>
③Set the background pattern not to scroll-- bgproperties <body bgproperties=fixed>
④The color of the file content text-- text <body text=color code>
⑤ Hyperlink text color--link <body link=color code>
⑥The color of the hyperlink text being selected-- vlink <body vlink=color code>
⑦The color of the linked hyperlink text--link <body link=color code>
The text and images they define will be displayed in the browser window. In the <body> tags, we can contain a lot of tags, and the common ones are as follows:
⑴ Change the size of the text <h#>…………….</h#>, where #=1~6; h1 is the largest character and h6 is the smallest character.
⑵ Change the font changes<font>.........</font>
① Change the font size <font size=#>.........</font> #=1~7; the larger the number, the larger the word
②Specify the font of the text <font face=font name>...........</font>
③ Change the color of the text <font color=#rrggbb>.........</font> rr: red color code gg: green color code bb: blue color code
⑶ Show small fonts <small>....</small>; Show large fonts <big>...</big>; Show bold fonts <b>.....</b>; Show italic fonts <i>.....</i>; Show typewriter fonts <tt>...</tt>; Show bottom line <u>. Show strikethrough fonts <sub>...</sub>; Show subscripts <sub>. Show superscripts <sup>. Show. Text flashing effect <blink>.....</blink>
⑷List break mark<br>; segment mark<p>
⑸ Change the alignment direction of the text. The # number can be left: table align to the left (preset value) center: table align to the center right: table align to the right. The text after PS<p align=#> will be displayed in the set alignment until another <p align=#> changes its alignment direction, or encounters the <hr>ⅱ<h#> tag, it will automatically set back to the preset left alignment.
⑹Insert a divider<hr>
①The thickness of the divider line <hr size=point number>
②The width of the divider <hr size=point or percentage>
③ Divider line alignment direction <hr align=#> # number can be left: table align to the left (preset value) center: table align to the center right: table align to the right
④The color of the divider <hr color=color code>
⑤Solid divider<hr noshade>
⑺Center alignment<center>.........</center>
⑻There are usually tables in the <body> tag. The tag that defines the table is <table>........</table> , which usually has the following attributes.
① Set the thickness of the border-- border<table border=point number>
② Set the width of the grid-- cellpacing<table cellpacing=point number>
③Set the distance between the data and the grid line-- cellpadding<table cellpadding=point number>
④ Adjust the table width--width<table width=point or percentage>
⑤ Adjust the table height-- height<table height=point or percentage>
⑥ Set the table background color-- bgcolor<table bgcolor=color code>
⑦ Set the color of the table border-- bordercolor<table bordercolor=color code>
⑼Display grid line <table border>
⑽Table title <caption>........</caption> Table title location – align <caption align=#> # number can be top: the table title is placed above the table (preset value) bottom: the table title is placed below the table
5.<!--Comment Content-->
<!--The mark indicates the beginning of the comment.
--> Tag indicates the end of the comment.
The function of annotation is to facilitate design and for others to read. When the browser processes HTML files, the annotation mark and the annotation content will be ignored.