Re-discussion: DIV+CSS Benefits to the website

Source: Internet
Author: User

1, Content and form separation, the Web front desk only need to display the content on the line, the form of art to the CSS to deal with. The resulting HTML file code is streamlined and smaller to open faster.

2, the revision of the site is more simple and easy, do not have to redesign the layout of the page, or even do not move the original site of any HTML and program page, just need to change the CSS file to complete all the revision. For the portal site, the revision is as easy as changing clothes.

3,css+div makes the website more simple and easy! Do not redesign the layout of the page, or even do not move the original site of any HTML and program page, just need to change the CSS file to complete all the revision.

Div+css for the portal site for the revision is like changing clothes as simple and easy, when the revision, do not change the entire site HTML page, only need to re-write CSS, and then with the new CSS overlay the previous CSS can be achieved. It's convenient. For example, I do a project: The www.ya-jing.cn, before the red, and now I directly in the CSS to change some code after the whole changed to blue style, and the width of the coarse scale is very easy to adjust.

Convenient is convenient, but a website, I would like to ask is it one months to change the version? or half a year to change it? It is estimated that such frequent sites are very small. Now many well-known websites, industry, portals, including personal sites, at most also a year to change the edition. Once a year, you write the CSS once a year, and you write CSS time that is one or two times times slower than when I was making a table (technically skilled). Then why do I have to use CSS ah? I can do the same with table, two minutes to the table, you use CSS to write for 10 minutes.

The country's small and medium-sized webmaster Web site data is generally within 100,000 data, and now use automatic batch generation HTML function, generated can not take a few hours time it. Fee This God is once a year, no big deal.

So unless your site is changed for one months, you can use the most skilled and convenient way to achieve web design.

Of course, if your CSS has been learned like fire pure green, and is a code madman. You when I say the nonsense.

4,css+div Web site construction to separate content and form, the Web front desk only need to display content on the line, the form of art to the CSS to deal with. The resulting HTML file code is streamlined and smaller to open faster.

This is the most present feature of DIV+CSS technology and the source of CSS. Completely subvert the current traditional (table) Web design technology. All the content that is now made with table can be solved with CSS, and the solution is more perfect and more powerful. You do not need to form a table, you just need to use Div set div can be used to achieve the previous form of the table set of art, the result is the use of DIV+CSS technology, so that the resulting web page file size is more streamlined, smaller. Table era, a page table to reach more than 10 is a very common thing, but now with div+css, a table can not be completely achieved before the effect, which directly lead to the page file size than the use of table when the reduction of 50%-80%, save you webmaster's hard disk space , visitors to open the page faster, and when using DIV+CSS, unlike the previous use of table, must have all the table read to display the page content, it is now possible to read a div to show an effect, we open the page does not have to wait. The benefits are really obvious and powerful.

This advantage is indeed significant, the use of traditional table-built web pages, content, sometimes up to 30K is possible, the file opened, there must be 0.0 seconds of delay. Using DIV+CSS, because there is no table to use, your front desk open to see all the direct content, CSS files are imported links, is another file, and the HTML file size does not matter, this generated HTML file, one also about 10K size. The number of files can not be seen, but more than the size of the file, it will save dozens of M.

These advantages actually get now, personal feeling is not very useful, why?

Because table although the HTML file generated larger, occupy more space, but now the virtual host space hundreds of dollars can reach more than 3G, a small and medium-sized portal or website, fully enough, even if not enough, Your data volume reaches 100,000 levels above, the generated HTML file also can not use 2G, this cost actually for small and medium-sized website long is completely negligible. Again, using table is about slow opening. This in the current network environment below, can also be ignored, now we are using the Internet is broadband, at least 512K, a Web page 30K, open also on the time of less than a second, the use of DIV+CSS is fast so 0.0 seconds, which is basically people do not feel. And since the HTML is generated, that effect on the server is the same, as long as your virtual host network stability, then the table and Div+css on the no difference.

But when you use table to make Web frames and tables, it's all a choice, which means you don't have to write code, it's easy to enter the border and the number of rows to make the request, but use div+ CSS, it is entirely by hand-written code, a table to write four lines of code, if a page involves more than 10 div table generation, handwriting code will be more than 50 lines, and if you are not good at math, or logical thinking ability, your handwriting will be 78 bad, table overlap and position is completely incorrect. Because when you write a table with DIV+CSS, the logical arrangement between tables is entirely determined by your own handwriting code, and if you don't have strong handwriting code and logic, you spend more than 4 times times as much time as you do with table production. Basically a page definition of the ID and class, the full page is not less than 20, an ID or class handwritten 5 sentences, you make an HTML page will be more than 100 lines of code, of course, many of which can be saved as a CSS file to repeat the call. In other words, the same page content, the same as the layout of the case, you can directly import the link CSS to achieve.

It's just like this. Create a page template when you generate HTML. But the time it takes to make this template is several times when it is made with table. Here are some people to say, but when I revise, I just need to write another CSS on it, no more HTML to generate. Then I would say, when you write another CSS file revision, I may have used table to make good one page template, but also automatically generated HTML full-site page. It's not impossible.

Re-discussion: DIV+CSS Benefits to the website

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.