CSS + DIV summary, css div Summary

Source: Internet
Author: User

CSS + DIV summary, css div Summary

CSS is a markup language used to control webpage styles and separate style information from webpage content. It is introduced to make the HTML language better adapt to the page art design.

CSS + DIV are put together because DIV is used as a block tag in HTML. CSS can use DIV labels to control the style of webpages.


CSS is inserted into HTML as a style sheet. When you read a style sheet, the browser will format the HTML document based on it. The methods for inserting the style sheet are: Intra-row and embedded, imported and linked. Of course, CSS has a certain rule, which consists of a selector and one or more declarations. Each declaration consists of one attribute and one value. Here is a detailed problem. Do not leave spaces between the attribute value and the Unit. If you use "margin-left: 20 px" instead of "margin-left: 20px", it is only valid in IE 6, however, it cannot work normally in Mozilla/Firefox or Netscape. In addition, in CSS, the class selector is displayed with a dot: the first character of the class name cannot use a number (it cannot play a role in Mozilla or Firefox ). CSS is case insensitive. However, there is an exception: if it involves working with HTML documents, the class and id names are case sensitive.

In addition to separating content and styles, CSS allows designers to make modifications more efficient and cost-effective. It also ensures visual consistency of the entire site and enables faster loading of webpages, when I learned this part, I watched CSS achieve the same effect. I was amazed at the magical power of CSS. In addition, I learned a little about my own operations and only had to do more, while writing code, you will be more impressed with the preview effect.

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.