WEB standard? Do you need it?

xiaoxiao2021-03-06  71

This article is purely initiated by this discussion of 9CBS:

http://community.9cbs.net/expert/topicview.asp?id=3265752

In this post, I tried to let everyone discard the table layout, and use XHTML CSS methods. However, many people don't understand because the form layout is quite simple, and the development is quite fast. Everyone is not tired.

In order to make everyone more experienced the benefits of Web standard development, I deliberately laying my privately using XHTML CSS, and it is relatively compared to another site I have developed during undergraduate.

Everyone will pay attention to carefully observe each detail carefully, and the actual open source is more complicated?

Use the table version of the site version (this should be eliminated immediately, do not hire himself):

http://www.swjtu.net/index.htm

http://www.swjtu.net/tw/index.asp

Use the XHTML CSS typography page:

http://www.ceocio.net/test/index.html

http://www.ceocio.net/test/main.html

Both instances contain a welcome page and an internal page.

If your network speed is slower, you can find that the two internal page downloads are obvious, using the table typographic page, you need to wait for all the contents in the table to display, and use the XHTML CSS typographic page to download one side display. From the complexity of the code, all page layouts are all in the CSS file due to XHTML CSS, so the code in the HTML page is very simple. In the discussion of 9CBS, many people said: "Use XHTML CSS to do simple pages, a little complex and beautiful page is still depends on the form layout", actually, can see my second internal page, form form Almost all of it can be achieved. to sum up:

Use XHTML, CSS benefits:

Easy to maintain, almost only the CSS files that only need to change the site can be revised. If you want to create a print page, you only need not to connect to CSS or use another CSS file. Similarly, such documents can be read by people in various needs. Save the space and site traffic of the site. In ASP.NET based on template development. The best example is the .TEXT system. ....

In fact, XHTML, CSS layout is quite simple, but there are some places that need to be changed:

Using DIV without using a table layout, of course, if you have a data list, you must draw a table box, that is an exception, in addition to this, don't use a Table tag. Use the Li tag to format data, you can see: http://www.ceocio.net/test/main.html news list is implemented with Li, where the images and the following lines are implanted by CSS built-in attributes. LI in Li. Write all public pictures to write the CSS file using the background attributes tab in the CSS, not in the HTML page, so that this is greatly convenient for future revision. For example, http://www.ceocio.net/test/main.html HTML page In addition to a new icon in the back root of the first news, all other images are defined in the CSS and are not appearing in HTML. ....

Maybe someone will feel that it is very troublesome? Is the development cycle long?

Whether the answer, I just finished using it for more than two hours (of course, the picture is pre-design) to the HTML page design, CSS design all work. And this is just two pages. If it is an actual project, when I write my body CSS file, my work is simply .... cool! In contrast, if you still use the traditional form layout, then repetition is too much, tired! Regarding this page of this page, you can click: http://validator.w3.org/check? URI = http://www.ceocio.net/test/main.html (xhtml) and http: //jigsaw.w3. ORG / CSS-VALIDATOR / VALIDATOR? URI = http://www.ceocio.net/test/main.html (CSS2.0) View, you can also test your site to see if it meets the standard.

In order to experience XHTML, CSS, you can download these two documents for reference:

http://www.ceocio.net/test/main.html

http://www.ceocio.net/test/main.css

转载请注明原文地址:https://www.9cbs.com/read-120647.html

New Post(0)