Page size Specification

Source: Internet
Author: User
Tags cdata

<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 strict//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-STRICT.DTD"> "http://www.w3.org/1999/xhtml"xml:lang="ZH"lang="ZH"> "http://www.w3.org/2000/08/w3c-synd/#"> <meta http-equiv="Content-language"Content="ZH-CN"/> <meta http-equiv="Content-type"Content="text/html;charset=gb2312"/> <title>blueidea</title> <style type="Text/css">/*<! [Cdata[*/#aa {color:red}. aa {Color:blue}/*]]>*/</style> "AA" class="AA">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div> </body> 

<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 strict//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-STRICT.DTD">"http://www.w3.org/1999/xhtml"xml:lang="ZH"lang="ZH">"http://www.w3.org/2000/08/w3c-synd/#"><meta http-equiv="Content-language"Content="ZH-CN"/><meta http-equiv="Content-type"Content="text/html;charset=gb2312"/><title>blueidea</title><style type="Text/css">/*<! [Cdata[*/. A {color:orange}.b {background: #eee}.c {border:1px solid red}/*]]>*/</style>class="a b c">aaaaaaaa</div></body>

One.

The Web Standard is not allowed to duplicate ID, such as div id= "AA" a page is not allowed to repeat 2 times, and class is defined as classes, theoretically can be infinitely repeated, so that the definition of multiple references can be used.

The

Class can also refer to multiple classes at the same time, separated by a space between different classes.


Two.

property priority problem, ID priority is higher than class, see above example


three.

Convenient JS and other client-side script, if you want to script an object in the page, then you can define an ID, otherwise only use traverse page element plus specify specific attributes to find it, it is relatively wasteful time resources, far less than a simple ID.

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.