HTML Instance Learning (Basic)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.