1.HTML
Note: for Chinese web pages it is necessary to use <meta charset= "Utf-8" > declaration encoding, otherwise garbled characters will appear. Some browsers will set GBK as the default encoding, then you need to set <meta charset= "GBK" >.
<!DOCTYPE HTML> <HTML> <Head> <MetaCharSet= "Utf-8"> <title>Document title</title> </Head><Body>Document Content ...</Body></HTML>
2, HTML title 1), HTML title
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>Kwinwei (cnblogs.com/kwinwei/)</title></Head><Body><H1>This is Heading 1.</H1><H2>This is Heading 2.</H2><H3>This is heading 3.</H3><h4>This is heading 4.</h4><h5>This is heading 5.</h5><h6>This is heading 6.</h6></Body></HTML>
2), HTML horizontal line
3), HTML annotations
You can insert comments into HTML code, which improves readability and makes your code easier to understand. The browser ignores comments and does not display them.
The notation is as follows:
<!--This is a comment that does not appear in the browser
3, HTML paragraph 1), HTML paragraph
The paragraph is defined by the <p> tag.
Note: The browser automatically adds blank lines to and from the paragraph. (</p> is a block-level element)
2), HTML wrapping (line break, soft return)
You can use <br/> to break lines without creating new paragraphs.
The <br/> element is an empty HTML element. Because the close tag doesn't make any sense, it doesn't have an end tag.
Attention:
We cannot determine the exact effect of HTML being displayed. The size of the screen, as well as the adjustment of the window, can result in different results.
For HTML, you cannot change the effect of the output by adding extra spaces or line breaks in the HTML code.
When a page is displayed, the browser removes extra spaces and blank lines from the source code. All contiguous spaces or blank lines are counted as a single space. Note that all consecutive empty lines (line breaks) in the HTML code are also displayed as a single space.
HTML Instance Learning (Basic)