HTML Learning Notes (vi)

Source: Internet
Author: User

1. Declare the user's encoding language as follows:

<metahttp-equiv= "Content-type" content= "Text/html;charset=utf-8"/>

When our webpage appears garbled in Chinese, we can try to change the value of CharSet: GBK, gb2312, Utf-8.

2. Write all the labels in lowercase letters

Most of the websites in the market are in the XHTML language, the latest HTML language is HTML5, and what we started to learn is HTML4. Both XHTML and HTML5 keyword tags are lowercase, so when writing code, the labels are all lowercase.

3. Add alt attribute to picture

ALT attribute values can be substituted for images displayed on a Web page when the picture is not displayed correctly on the page.

4. Add quotation marks to all attribute values

5. Close all labels

Both single-label and double-label should have a close symbol

6. The difference between the ID selector and the class selector:

The ID value of the same name is allowed only once in the current XHTML, and the class name can be reused multiple times.

7. The contents of a block-level element are automatically replaced by a new line.

8. We can use display:block; change an inline element into a block-level element; We can also use display:inline; change a block-level element into an inline element.

9. The floating properties of the DIV:

Because the div tag is a block-level element, the default is to occupy a row, then we want to have two or more div on the same line, we will use float property float.

10. In the style Set Div Center can use margin:0px auto;


11. Remove the symbols in front of the unordered list using List-style:none;


HTML Learning Notes (vi)

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.