HTML plays an important role in the rapid development of web. The original intention of HTML is to express the content of tags (<p> and <Table>. Meanwhile, the document layout is completed by the browser without any format labels. Gradually, ie constantly adds new HTML tags and attributes to HTML specifications. It is increasingly difficult to create websites with clear document content independent of the Document presentation layer. To solve this problem, a style sheet other than HTML is created, that is, CSS Cascading Style Sheets.
I learned CSS + Div for a week and summarized it as follows:
This video mainly describes how to use CSS + Div for webpage layout. The first half is some basic CSS styles, followed by some examples to understand the layout of CSS + Div Based on the examples. Write each part as a DIV, and then use CSS to control its style to beautify the layout effect, focusing on actual operations.
This video mainly includes the basic syntax and concepts of CSS: how to set webpage elements such as text, images, backgrounds, tables, and menus, and how to use CSS filters. There are also some extensions: CSS and JavaScript, CSS and XML, CSS and Ajax integrated applications. There are several major examples to illustrate the CSS + Div layout. Place a piece of content in a DIV, and set the ID and class style of its tag in CSS. HTML code and CSS code are separated.The methods for introducing CSS in HTML are as follows:In-row style,Embedded,Chain external style sheets,Import internal styles.
Conclusion: learning CSS + Div focuses on understanding and operations. More exercises are required. Each language has its own advantages and disadvantages.
Advantages of Div + CSS:
1. Reduce page loading time
The page size becomes smaller and the browsing speed becomes faster.
2. Easy to modify
HTML pages and CSS code are separated to separate the content and representation of webpages. You only need to change the style when modifying the design. It does not break the layout of other styles on the page. This feature is not available in tables.
3. Maintain visual consistency and powerful font and typographical capabilities
Place styles in CSS files to avoid effect deviations between different regions or pages.
4. Good for search engine crawlers: In general, the layout bytes of the HTML file table on the same page are larger than those of the DIV + CSS layout, which can save time for crawling and downloading pages by search engine crawlers.
Disadvantages:
1. High Development Technology: It is highly required to be compatible with browsers and version browsers.
2. Long development time: it is much more complicated than table positioning and is prone to problems.
3. Relatively high development costs: high technology and long time determine high costs.