1.HTML marker Type
(1) Container tag: Paired start tag with end tag < start tag >...</end tag >
(2) Single tag: only start tag without end tag < single tag >
The composition of the 2.HTML:
<!DOCTYPE HTML><HTML><Head><title>Title</title>//head</Head><Body>//body</Body></HTML>
<title></title> Tags: used to describe the title of the page, which is displayed in the title bar of the browser
<body></body> Tags: Place the contents of a Web page directly on the page
3. Tag attributes: Some headings can be added with attributes to change how they appear on a Web page, attributes are placed directly within the opening tag, and are separated by spaces if more than one attribute is present
Example:
< start Tag Property name 1= Set value 1 property name 2= Set value 2 ...>
4.HTML4 can use the <div> tag to develop the page Structure ID property name, HTML5 Unified the markup of the Web page schema, with some easily recognizable semantic tags instead
| Mark |
Description |
|
Display site name, subject, or primary information |
| <nav> |
Web site's Connection menu |
| <aside> |
For sidebar |
| <article> |
Used to define the main content area |
| <section> |
For chapters or paragraphs |
| <footer> |
In the footer, used to place the copyright notice, author and other information |
Cases:
<Body> <Header>Website theme</Header> <nav>Connection Menu</nav> <article>Main content< Section>Chapter paragraphs</ Section> </article> <aside>Side bar</aside> <Footer>Footer</Footer></Body>
5. Standard HTML files must use the standard specification used by the DOCTYPE declaration in the Pre-file section
DOCTYPE declaration in HTML5: <! DOCTYPE html>
6. Language and Encoding type:
Language declaration method: in
Web page encoding declaration: <meta charset= "GB2312" >
Note: GB2312 is Simplified Chinese code, only support Simplified Chinese, UTF-8 is International code, support multiple languages, not prone to garbled problems
Web page encoding declaration is consistent with the encoding format when you save the file
HTML5 Learning Notes -2.html Basics