In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about the difference and relationship between DIV and table page layout. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
To describe the difference and relationship between DIV and Table page layout, generally speaking, Table development is fast, easy to control, and browser compatibility is better.
The difference and relation of page layout between DIV and Table
Now there are differences on whether to choose the traditional Table or the new DIV for web page production. Some say that it is better to use Table, which is fast to develop, easy to control and compatible with browsers, while others think that DIV is good, and the future development trend is mainly due to the following reasons:
DIV+CSS layouts save page code and the code structure is clearer than Table layouts.
DIV+CSS development is faster than Table and the layout is more accurate, but handwritten code significantly increases the DIV+CSS layout, making it easier to modify the site layout.
The DIV+CSS layout can adapt to a variety of client needs in the future.
DIV+CSS layout saves site space and site traffic. These are the benefits of DIV.
Is it interesting that DIV has so many advantages? I decided to learn from it. DIV and Table have their own advantages, and they are usually used interchangeably.
I feel that the correct design idea is to use DIV and other layout elements to make the page layout, positioning, color blocks, pictures and so on. Use elements such as Table,UL to display the data that needs to be displayed on the page. Because DIV will not be like Table, the entire Table will not be displayed until it is downloaded under IE (firefox will not), so it is obviously not appropriate to use Table for layout, especially when the amount of data is large, using Table under IE will find it much slower. And DIV is much better. Of course, DIV also plays a role in collating data.
DIV is used for layout and Table is used to display data, which is now the most basic design principle.
DIV can be embedded in 1:Table. On the contrary, can DIV embed Table?
Of course you can.
◆ DIV definition
Represents an area where HTML can be displayed.
SpecifiesacontainerthatrendersHTML.
Annotation
This element is available in InternetExplorer3.0 and above HTML, and in InternetExplorer4.0 and above scripts.
This element is a block element.
This element needs to close the tag.
TheDIVelementisavailableinHTMLasofInternetExplorer3.0,andinscriptasof InternetExplorer4.0. Thiselementisablockelement. Thiselementrequiresaclosingtag.
Sample code
The following example uses two DIV elements to align two paragraphs of text differently.
ThisexampleusestwoDIVelementstoaligntwosectionsoftextdifferently. This text represents a paragraph. You can put your HTML or text here. This text represents another paragraph, and its Chinese text is centered.
DIV itself is a container, you can embed not only Table but also text and other HTML code.
Does 2:DIV play the same role as Table?
The function of DIV is similar to that of Table, but DIV has better support for xml and is more flexible to use, so it is recommended as a new way of web layout.
Which is faster in 3:DIV Table?
DIV is relatively fast, and the display of web content needs to download a relatively whole piece of content and then display it. Using DIV layouts is a lot of independent and relatively small scope, while using Table layouts generally results in tables nesting multiple layers to form a larger download scope.
The above is the difference and connection between DIV and table page layout shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.