Home >Web Front-end >Front-end Q&A >Why use div+css layout
Reason: 1. Complying with W3C standards can ensure that the website will not be eliminated due to future network application upgrades. 2. Write most of the code in CSS, making the page smaller and browsing faster. 3. Maintain visual consistency. 4. Separate content and structure, making it easier to save time when modifying pages. 5. Convenient for search engine collection and inclusion.
The operating environment of this tutorial: windows7 system, css3&&html5 version, Dell G3 computer.
(Learning video sharing: css video tutorial)
DIV CSS is a WEB design standard, it is a web page layout method. Different from the traditional way of positioning through table layout, it can realize the separation of web page content and presentation.
Reasons for using div css layout (advantages)
1. Comply with W3C standards.
This ensures that your website will not be obsolete due to future network application upgrades.
2. More friendly to viewers and browsers.
Because CSS is rich in styles, it makes the page more flexible. It can achieve unified and non-deformed display effects according to different browsers. This supports browser backward compatibility, which means that no matter who wins the browser war in the future, your website will be well compatible.
3. Make the page load faster.
The page size becomes smaller and the browsing speed becomes faster. Since most of the page code is written in CSS, the page volume and capacity become smaller. Compared with the table nesting method, DIV CSS separates the page into more areas, which are loaded layer by layer when the page is opened. Instead of enclosing the entire page in a large table like table nesting, the loading speed is very slow.
4. Maintain visual consistency.
The previous method of making nested tables would cause deviations in the display effect between pages or between regions. Using the DIV CSS production method, all pages or all areas are uniformly controlled by CSS files, which avoids effect deviations reflected in different areas or different pages.
5. Be more efficient when modifying the design.
Due to the use of DIV CSS production method, the content and structure are separated, making it easier to save time when modifying the page. According to the regional content tag, find the corresponding ID in CSS, which makes it more convenient to modify the page, and will not destroy the layout style of other parts of the page. It is easier to divide labor and reduce interdependence in team development.
6. Search engines are more friendly.
Compared with traditional tables, web pages using DIV CSS technology write most of the HTML code and content styles into CSS files, which makes the code in the web page more concise and the text part more prominent. Obviously, it is easy to be collected and included by search engines.
For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of Why use div+css layout. For more information, please follow other related articles on the PHP Chinese website!