Summary of Html, Css, Dom, and javascript

Source: Internet
Author: User

When building a webpage Html framework, try to define class or id only for the outer tag (that is, the parent tag), and the inner tag (that is, the Child tag) if it can be expressed through nesting, the nested method is used, without the need to define a new category or dedicated id. The nesting of selector and the collective declaration of selector can greatly reduce the declaration of class and id and simplify Css code.

On the Html page, RGB is the three primary colors of red, green, and blue. Each color is composed of different percentages of the three colors, which are divided into 0 ~ 255, for example, rgb (100%, 100%, 100%), rgb (255,255,255), and # FFFFFF all refer to white, where # FFFFFF is a hexadecimal representation, the first two are the red component, the middle is the green component, and the last two are the blue component.

In different browsers, the compatibility of width and height values is poor. If no special declaration is made, in IE7, content + padding is specified) + border refers to the width or height of content in Firefox or google.


The top, right, bottom, and left Css attributes must be used together with the position attribute, it indicates the distance between the boundary of a block and the page border (when the position attribute is set to absolute) or the original position (when the position attribute is set to relative.

If the node that uses getElementById () to obtain the given id has the name attribute of the element with the same name, this element is returned in IE browser. This is a very serious Bug, so we should try to avoid duplication of the id and the name attribute of other elements when building the framework.



<Div> what is different from <span> labels: <div> is a block-level element. The inner element is automatically wrapped, while <span> is just a row element, there is no line feed before and after it.

 

Related Article

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.