Home >Web Front-end >HTML Tutorial >CSS DIV summary_html/css_WEB-ITnose
CSS is a markup language used to control the style of web pages and separate style information from web content. It was introduced to make the HTML language better adapt to the art design of the page.
CSS DIV is put together because DIV is a block mark in HTML, and CSS can control the style of web pages through DIV tags.
CSS is inserted into HTML as a style sheet. When a style sheet is read, the browser will format the HTML document according to it. The methods of inserting a style sheet are: Inline, embedded, imported and linked. Of course, CSS has its own rules, which consist of a selector and one or more declarations. Each declaration consists of an attribute and a value. There is a detail here, do not leave a space between the attribute value and the unit. If you use "margin-left: 20 px" instead of "margin-left: 20px" it will only work in IE 6, but will not work properly in Mozilla/Firefox or Netscape. Also, in CSS, class selectors are displayed with a period: the first character of the class name cannot be a number (it won't work in Mozilla or Firefox). Also CSS is not case sensitive. There is one exception: when it comes to working with HTML documents, class and id names are case-sensitive.
In addition to realizing the separation of content and style, CSS allows designers to be more efficient and reduce costs when making modifications. It also ensures that the entire site maintains visual consistency. It also allows web pages to load faster. Learn this Sometimes I am amazed at the magical power of CSS when I look at the consistent effects achieved by CSS. In addition, I rarely learn how to operate this part by myself. Only by doing more and previewing the effects while writing code will the impression be more profound and accumulated.