1. Basic syntax
tag as the smallest unit of a web page
|-Double tag content container
|-But label control content
comment Each module must write a clear comment
2. Basic structure
<!DOCTYPE html> |-Tell the browser, I am this The document is an html document
<html>
<head>
<meta charset="UTF-8"> |-set Chinese encoding utf-8
<title></title> |-page title
</head>
<body>
|-page The content of
</body>
</html>
3. Common tags
|-<body></body> The content of the web page must be written in the body
|-Format control class
|-Bold, italic, underline, newline, space
< b></b> <i></i> <u></u> <br/>
< b > Today is April 26 </ b >< br /> < u > Today is April 26 </ u >< br /> < i > Today is ; April 26 < br /> School starts today </ i >
|-Content container class
|
-Title <h1>~<h6>
< h1 > Today is April 26 </ h1 > < h2 > Today is April 26 </ h2 > < h3 > Today is April 26 </ h3 > < h4 > Today is April 26th </ h4 > < h5 > Today is April 26th </ h5 > < h6 > Today is April 26th </ h6 >
|-Paragraph
<p></p>
|-Inline tags: as big as the content is, I will be as big as
<span></span>
< p > Today is April 26 </ p > <!-- inline tags --> < p > Today < span style ="color: yellowgreen;" > Tiankai </ span > School </ p > < p > I < span style ="background-color: aquamarine;" > very open </ span > heart </ p >
|-div: occupies a whole line by default
<div></div>
<div style="background-color: darkgrey; height: 40px;"></div>
|-ordered list, unordered list
ordered list <ol><li></li></ol> type attribute: 1 a A i I
< ol type ="I" > < li > Today is April 26 </ li > < li > Today is April 26 </ li > < li > Today is April 26 < / li > < li > Today is April 26th </ li > < li > Today is April 26th </ li > </ ol >
Unordered list <ul><li></li></ul> type attribute: circe disc square
< ul type ="square" > < li > Today is April 26 </ li > < li > Today is April 26 </ li > < li > Today is April 26 < / li > < li > Today is April 26 </ li > < li > Today is April 26 </ li > < li > Today is April 26 </ li > </ ul >
4. Common tags
|-a tag
function: as a link, as a download, as an anchor
<a href="../../0421/a01.html">山东理工大学</a> <a href="../../lesson1.txt">txt文档</a> <a href="../../0421/hang3.jpg">图片</a> <a href="../../0421/wzb2 - 副本.rar">下载</a> <a name=“top”><a/> <a href="#top"a</Picture>>