Table and Div comparison

Source: Internet
Author: User
Tags website cost
* The following text is used to collect articles on some websites or forums. It does not represent my opinion and is for reference only.
========================================================== ==================================

In fact, not div is faster than table, but Div has some advantages that make it "faster" than table.
1. A Div can be downloaded to display one, while a table can be displayed only after being completely downloaded.
2. Div can be typeset with fewer Divs.

The main reason is that the table tag is displayed only after it is parsed to the corresponding </table>, and the DIV does not need to be used here! It is displayed on top!

CSS + div is one of the commonly used terms in website standards (or "web standards"). It is usually used to describe the difference between CSS + Div and table positioning methods in HTML web design languages, in the XHTML website design standard, table positioning technology is no longer used, but various positioning methods are implemented using CSS + Div.

Advantages of CSS + Div Website Design

First of all, the major advantage of CSS is its concise code. For a large website, it can save a lot of bandwidth. As we all know, search engines like clean code (its true significance lies in, the proportion of valid keywords in the total code of webpages is increased. Therefore, websites created using CSS + Div web standards have the advantage of Friendly search engines.

Secondly, the website made by CSS + Div makes the website revision relatively simple. Many problems only need to change CSS without modifying the program, thus reducing the cost of the website revision.

Although CSS + Div has some advantages, the current CSS + Div website construction has obvious problems, mainly manifested in:

First, the high dependence on CSS makes webpage design more complicated. Compared with the table layout (table) in html4.0, CSS + div is not highly difficult, but at least it is much more complicated than table lattice positioning. Even for website design experts, it is easy to encounter problems, not to mention beginners, which affects the popularization and application of the XHTML website design language to a certain extent.

Second, an exception in the CSS file will affect the normal browsing of the entire website. The design elements of CSS websites are usually put in several L external files, which may be quite complex or even large. If the CSS file call is abnormal, the whole website will become terrible.

Third, the problem of browser compatibility in CSS website design is prominent. HTML-based Web Design in ie4.0 and later versions, there is almost no browser compatibility problem, but the CSS + Div designed website is normally displayed in the IE browser, to Firefox) but it may not be clear (this is why network marketing personnel are recommended to use Firefox ). CSS + Div needs further support from various browser vendors.

Div + CSS is used as a whole website. If it is purely Div layout, it is troublesome, especially when div is nested in your Div and Div layout, you still need to discard some page effects, such as the slice rounded corner. If the set div is more troublesome, it may be deformed in a DIV in the vs2005 designer. If there are too many sets of Div, it is troublesome for you to implement Ajax dragging, so I think it is better to use Div + nested table.

Rounded corner-you can use Div + CSS to make a beautiful rounded corner without any image. It is adaptive to width and height.

How to implement it? Dig out the CSS template of Google Talk

Forget the DIV and table!

The biggest feature of HTML is its compatibility and adaptability.

After using the complex Div + CSS, you may find that the beautiful pages in IE look like a paste in other browsers. It is not advisable to create a website and serve only specific browsers. If you see a webpage with the words "Please use XXX to browse", a single word is "bad "!

The HTML browser will automatically typeset the page content, which is difficult for common applications. If a large number of blank pages are wasted on the high-resolution display, and the long and long scroll bars are used, the fixed font size is used, all of them are the "half-way Monk" transferred from the development of applications ".

Do not imitate the so-called "XX excellent website design". If it is not the organizer's intention to promote a certain technology, the author's artistic skills are too good. A good website can only be enriched, concise, organized, and easy to read first, and then decorated with icing on the cake.

Div/CSS has been completely transformed. It is still quite troublesome at the beginning. You can check the style document without moving it. Now you can basically write it manually.

It is recommended to use the vs2005 layout. For example, after a page is laid out in the standard style of vs2005, It is a quick way to extract the styles one by one into a separate CSS file.

The difference between Span and DIV is that division is a block-level element that can contain paragraphs, titles, tables, and even chapters, summaries, and remarks. While span is an element in the row, it does not wrap the line before and after the span. It has no structural meaning and is purely an application style. When other elements in the row are not appropriate, you can use span.

The following example shows the difference between the two attributes.

Code:

The span tag has an important and practical feature, that is, it does nothing. its only purpose is to focus on other elements in your HTML code, in this way, you can specify styles for them. In this example, the identifier allows you to divide a paragraph into different parts.

Another identifier has similar functions,

DIV is also used to create a logical part in an HTML file. However

Different span,

It works at the text block level. It introduces line separation before and after the HTML elements it contains.

Effect:

The span tag has an important and practical feature, that is, it does nothing. its only purpose is to focus on other elements in your HTML code, in this way, you can specify styles for them. In this example, the identifier allows you to divide a paragraph into different parts.

Another identifier has similar functions,

DIV is also used to create a logical part in an HTML file. However

Different span,

Work at the text block level. It introduces line separation before and after the HTML elements it contains.

Bytes -------------------------------------------------------------------------------------------------------------------

Thoughts on Div and table (change from self-help CMS Forum)
Here is my personal opinion!

Recently, the mobile forum has set off a boom in Div + CSS. As Div + CSS is a standard and front-end of website construction in the world, then, some people think that DIV runs faster than table, so that many people join the ranks of Div + CSS.

But have you ever tested it? Where is Div superior to table? How fast is it than a table?
Anyone familiar with website setup knows that a website with table structure needs to load the table first and then read the content in the table, while div is directly loaded, therefore, to some extent, the DIV loading speed is better than that of the webpage with the table structure.

But is this absolute?

The answer is: Not necessarily.

Recently, Phoenix Nirvana conducted a test on four pages, two forms of web pages and two types of Web Page structures. When the data volume is the same, the first conclusion is that DIV must be faster than the table structure, but how much faster? After testing on the same server, when two types of pages and the same data volume exist, div is faster than table. taking the core of beat1 as an example: the article calls five topics and each calls 10 titles; downloads and calls 2 topics, each calls 10 topics; the mall calls 4 titles + images; the image channel calls 6 images, and website statistics hide calls. The bandwidth is 10 MB. After precise read-second calculation, the webpage of the DIV structure is less than 1 second faster than that of the table. It can be seen that, if the table webpage Structure Code is optimized well, the speed can be improved as well !!!

Test with template 263: test environment: Dual-Xeon server, 20 m exclusive bandwidth, local test connection bandwidth of 10 m. The test starts around midnight. The vlo8 test time used in the current template 263 is: 4 seconds 30 or so. The test template 263 _ V2 (div structure) is opened for about 2 seconds 30, the structure of the test template 263_2006_v3 (DIV). The opening time is 2 seconds. However, it should be noted that the DIV structure website data tested in template 263 is incomplete, that is, the data is not fully loaded, but the speed difference is about 1 second.

It is true that DIV, as an industry standard, will gradually approach us, and as a friend and enthusiast in this industry, it is also a technology that should be mastered. However, I personally think that there will be a blind zone in both technology and ideas, and this div is a blind zone in the web page industry. First, we must know that even if a dynamic website generates a static page, it is also possible to read data from the database, such as website surveys. Website statistics .... Therefore, the speed of a certain dynamic website is not greatly improved;

However, many W3C-standard codes are not usable, such as IFRAME, which are not qualified if verified. For websites with Div structures, there are a lot of manual code. dw editing is in an invisible state (even if it is visible, it is not in the browser state), so the code needs to be typed in one line by itself, CSS in the background is the same, and CSS usage is larger, because div is defined by ID. However, it is certain that DIV is very good at hand-writing code !!!

My personal example: To write a homepage code Div + CSS, it takes about one day to use Div. At this time, I can make a homepage + a homepage of a channel. For example, the border of some tables. If I use a table, I only need to fill it in. The DIV structure needs to define this ID, which is equivalent to increasing the CSS workload.

As for the current business development, the final webpage we processed is handed over to the customer. How are the div-structured webpage customers maintained? If the customer is able to skillfully maintain the DIV structure of the webpage (including some changes to the front-end), then he may no longer need you. After obtaining the table, the customer can easily maintain and expand the table. The website cost of the relative Div structure is also higher than that of the table. This is only the cost of the system, and does not include the later maintenance!

In fact, this does not mean how bad the DIV is. template 263 also began to create and enable the DIV structure template, but the website with this structure needs to be familiar with the code and structure.

Currently, some structures of the mobile system do not support Div structures, such as link labels and column templates. (If the W3C logo is used, the error 500 will occur ), backend editing removes attribute quotation marks (this is absolutely not allowed in W3C ).

Remember to check the compatibility of IE, Firefox, and opera browsers.

Here we only want to tell you: do not blindly follow the technology !!!

CSS + div is one of the commonly used terms in website standards (or "web standards"). It is usually used to describe the difference between CSS + Div and table positioning methods in HTML web design languages, in the XHTML website design standard, table positioning technology is no longer used, but various positioning methods are implemented using CSS + Div.

Advantages of CSS + Div Website Design

First of all, the major advantage of CSS is its concise code. For a large website, it can save a lot of bandwidth. As we all know, search engines like clean code (its true significance lies in, the proportion of valid keywords in the total code of webpages is increased. Therefore, websites created using CSS + Div web standards have the advantage of Friendly search engines.

Secondly, the website made by CSS + Div makes the website revision relatively simple. Many problems only need to change CSS without modifying the program, thus reducing the cost of the website revision.

Although CSS + Div has some advantages, the current CSS + Div website construction has obvious problems, mainly manifested in:

First, the high dependence on CSS makes webpage design more complicated. Compared with the table layout (table) in html4.0, CSS + div is not highly difficult, but at least it is much more complicated than table lattice positioning. Even for website design experts, it is easy to encounter problems, not to mention beginners, which affects the popularization and application of the XHTML website design language to a certain extent.

Second, an exception in the CSS file will affect the normal browsing of the entire website. The design elements of CSS websites are usually put in several L external files, which may be quite complex or even large. If the CSS file call is abnormal, the whole website will become terrible.

Third, the problem of browser compatibility in CSS website design is prominent. HTML-based Web Design in ie4.0 and later versions, there is almost no browser compatibility problem, but the CSS + Div designed website is normally displayed in the IE browser, to Firefox) but it may not be clear (this is why network marketing personnel are recommended to use Firefox ). CSS + Div needs further support from various browser vendors.

Div + CSS is used as a whole website. If it is purely Div layout, it is troublesome, especially when div is nested in your Div and Div layout, you still need to discard some page effects, such as the slice rounded corner. If the set div is more troublesome, it may be deformed in a DIV in the vs2005 designer. If there are too many sets of Div, it is troublesome for you to implement Ajax dragging, so I think it is better to use Div + nested table.

Rounded corner-you can use Div + CSS to make a beautiful rounded corner without any image. It is adaptive to width and height.

How to implement it? Dig out the CSS template of Google Talk

Forget the DIV and table!

The biggest feature of HTML is its compatibility and adaptability.

After using the complex Div + CSS, you may find that the beautiful pages in IE look like a paste in other browsers. It is not advisable to create a website and serve only specific browsers. If you see a webpage with the words "Please use XXX to browse", a single word is "bad "!

The HTML browser will automatically typeset the page content, which is difficult for common applications. If a large number of blank pages are wasted on the high-resolution display, and the long and long scroll bars are used, the fixed font size is used, all of them are the "half-way Monk" transferred from the development of applications ".

Do not imitate the so-called "XX excellent website design". If it is not the organizer's intention to promote a certain technology, the author's artistic skills are too good. A good website can only be enriched, concise, organized, and easy to read first, and then decorated with icing on the cake.

Div/CSS has been completely transformed. It is still quite troublesome at the beginning. You can check the style document without moving it. Now you can basically write it manually.

It is recommended to use the vs2005 layout. For example, after a page is laid out in the standard style of vs2005, It is a quick way to extract the styles one by one into a separate CSS file.

The difference between Span and DIV is that division is a block-level element that can contain paragraphs, titles, tables, and even chapters, summaries, and remarks. While span is an element in the row, it does not wrap the line before and after the span. It has no structural meaning and is purely an application style. When other elements in the row are not appropriate, you can use span.

The following example shows the difference between the two attributes.

Code:

The span tag has an important and practical feature, that is, it does nothing. its only purpose is to focus on other elements in your HTML code, in this way, you can specify styles for them. In this example, the identifier allows you to divide a paragraph into different parts.

Another identifier has similar functions,

DIV is also used to create a logical part in an HTML file. However

Different span,

It works at the text block level. It introduces line separation before and after the HTML elements it contains.

Effect:

The span tag has an important and practical feature, that is, it does nothing. its only purpose is to focus on other elements in your HTML code, in this way, you can specify styles for them. In this example, the identifier allows you to divide a paragraph into different parts.

Another identifier has similar functions,

DIV is also used to create a logical part in an HTML file. However

Different span,

Work at the text block level. It introduces line separation before and after the HTML elements it contains.

1. webpage background color settings

Error Rate: Large
Universality: Wider
Possibility of making mistakes: lazy/unknown

About two years ago, I found that there was no background color set on 21cn. At that time, I sent an email to them. Since then, I have never committed this problem.

The background color of most people's windows is white, but if a person like me has a personality like me, the background color of Windows will be changed to gray or other colors, if you didn't set the background color of the webpage, you thought the normal webpage would look a mess on my computer.

2. Abuse of align Center (Automatic Center)
Error Probability: very large
Universality: very wide
Possibility of making mistakes: convenient/easy to use

At work, it is common to modify and maintain others' webpages. Many people have a bad habit:
In this way, you center the text or image in the table, move it to the left or to the right?

<Div align = "center"> hello !! </Div>
<Div align = "center"> </div>

When there are many tables, many texts, and very detailed content, I love to use this method (its shortcut key in DW is CTRL + ALT + C, FP does not know what it is) people tend to be crazy and miserable. When I encounter such a webpage, I have a headache. Why should I use so many <div> to center? Tell me why? Is the table not centered? Why do I need to add these junk code? The Code <Div align = "center"> cannot be automatically cleared after the text or image is deleted, in complex web pages, the maintainer's time is wasted without reason.

We recommend that you use <TD align = "center"> to center data. <Div align = "center"> is considered only when multiple positioning is required, because this code is not easy to handle, therefore, Replace tables with tables.

3. Repeat the code that implements the same function, or a mess of code.

Error Rate: very common
Universality: very common
Possibility of making mistakes: complicated and diverse

Let's take a look at the following code:
<Center> <p> <font class = "css_id"> <font class = "font11"> <font color = "# cccccccc"> <font color = "# ffa76c"> question mark </font> <br> </center> what do you think of this code? </Font> </P>

I don't know what the reader feels like. As soon as I see such code, I will be numb to myself for ten seconds, in the past ten seconds, the goal is to find a word that can express my thoughts and feelings (Me? Do you want to ask me? Sorry ~~, I usually don't do this because I spend at least half of my time browsing the code on a web page. I can see at a glance that there should be more than anything in the Code .).

Look at the code above and use two classes and four font to define two texts. In fact, this problem is often caused by constant changes, people who are not familiar with the Code, are too lazy to view the code, or do not like to view the code are very serious. Of course, when someone else browses this page, there is no problem, but the maintenance personnel .............
These redundant junk code can be omitted. In fact, the above example is not serious enough, and I have seen it even more frightening.

Another question to mention is <p>... </P> and <center>... </center>. Why should we use them? Tell me why ~~, What's more:

<TD> <Div align = "center" class = "css_id">
<Center>
<P align = "center"> </P>
<P align = "center"> <font class = "css_id"> <font class = "font11"> <font color = "# cccccc"> <font color = "# ffa76c "> question mark </font> <br> </center> </TD> what do you think the code looks like? </Font> </P> </center> </div> </TD>

I am helpless when I see such code (more helpless is that I often see it and have to read it). I will simplify it:
<TD align = "center" class = "css_id"> <br> <font color = "# ffa76c"> title </font> <br> the code looks like this how about it? </TD>

Does it seem like the world is much quieter? The text after "title" can be defined in the <TD> class. Even if CSS is not used, it's okay to use one more <. Font>. It's just as refreshing.

4. Incorrect table nesting

Error Rate: Average
Universality: Universal
Possibility of making mistakes: not familiar with this

In fact, this is a street news problem, but people continue to commit crimes. Incorrect nested forms may cause you to be scolded by the boss for calling the office, it will not take 2 or 3 minutes for you to open a webpage that you think is normal.

First, let's talk about the first problem, that is, constantly embedding tables in a big table, which slows down the page opening speed (although the current IE has improved this problem, but it is not recommended to do so). On the other hand, maintenance and modification are extremely inconvenient. Generally, simple application is no problem, or even Layer 3 or Layer 4, but do not put all the content in a table.

The second problem is to put all the content in a big table, including a free counter code. Hey, you guess what may happen? In fact, it's no big deal. The most serious thing is that your IE is like a dead end and nothing is displayed. The solution is to put the counter in a separate table instead of the other content in the same table.

5. Use spaces instead of tabs when writing code indentation

Error Rate: Average
Universality: less
Possibility of making a mistake: I don't know how to use a tab.

This problem is aimed at JS, vbs, ASP, PHP, and so on. html can't use tab to write a little program and all know what it is called indent and how to indent it? Some use spaces and some use tabs. If you use spaces, use tabs from now on.

There are two major disadvantages of using spaces: 1. Slow indent speed and slow modification speed. 2. Increasing the size of the web page will affect the speed.

Bytes -----------------------------------------------------------------------------------------------

Translated from an objective look at Table based vs. CSS based design

My opinion is similar to that of the author. The standard is good, but it may not be practical.

The following is an ZT article:

Over the years, many excellent articles have praised the superiority of CSS-based design and lamented the decline of table-based design. But few people think about it from another angle, maybe because you have to understand and use the CSS-based design before you can criticize it. Once you understand it, you don't want to go back and use the old design method.

To make up for this imbalance, I decided to write an article to explain why in some situations, traditional table design methods are no better than CSS-based or standard-based design methods.

I. demonizing tables

Before the appearance of a table, the Web was quite boring. It was the use of table layout that opened a new situation of Visual page design. The contribution of tables to the popularization of the Web and web design fields may be controversial, but once we leave the form, our web designers will lose their jobs, but there is no doubt.

In recent years, table-based design has indeed been demonized. Web purification analysts will tell you that a table is meaningless for typographical use, so you must never use it. However, history has proved that many technologies were designed to achieve a specific goal at the beginning, but they have found more useful in other fields. Just like the Web itself, it was not just about sharing research data at the beginning, but its entertainment and business applications are now in parallel with information and education.

2. Just make it more comfortable

Web designers have been using table layout pages for many years. This is the capability that most designers have mastered. Using tables in this way can ensure you get the expected results, through some simple hack, such as interval GIF, we almost certainly ensure that our sites look the same on the widest web browser, from the lowest version of Netscape 4 to modern browsers such as safari.

Although the pioneers have been promoting web standards for a long time, most websites still use tables and incompatible standard code for development, therefore, the user agent has to support table-based formatting for a long time. This is a fatal blow to the selling point of web standards: standards do not have a proper position. This is unlikely to happen. A major browser vendor (or Microsoft) Suddenly published a browser that cannot be displayed on most websites.

Therefore, web designers do not feel the sense of crisis and necessity to start using CSS-based typography and supporting standard code.

Iii. lower the threshold for Web

It is because of its low threshold that HTML is so successful: HTML is a simple and easy-to-learn language, and browsers can tolerate many messy documents. This makes it incredibly easy to publish content on the web. Even your 12-year-old nephew can use the FrontPage included in Microsoft Office to create a simple website.

Table-based design is based on CSS. Of course, the CSS syntax is very simple. Normal people will agree that you do not need to be a rocket scientist to learn CSS. However, some of these concepts are too subtle to comprehend. For example, on the surface, the box model is very simple, but I occasionally slide on the border collapse (margin collapsing), float and clear) this concept is hard to understand and is difficult to use. In my experience, from understanding the basic concepts of CSS to being able to use CSS development sites freely, we need to go through a learning curve from.

Then there is a problem with browser support. Once you start to work, you will gradually learn which browser supports, does not support, and some common browser bugs. It is a pity that there are too many bugs. Even "experts" cannot estimate the time they spend fixing bugs. It is even more frustrating for new users, because they do not know whether they have misunderstood CSS or some obscure browser bugs? Maybe that's why the same problem has repeatedly appeared on the CSS-discuss and other email lists.

It would be much easier for browser vendors to develop websites with CSS if they could eventually achieve consistency. But I still think-most people will also agree-the CSS development threshold is too high than the table-based. In other words, I think this also shows why CSS-based design is so popular among web experts. This allows them to distinguish themselves from those amateur "front-page Cowboy", so that they can find the feeling that the Web only belongs to their small group. Probably because of this, so many people regard web standards as an intouchable "Ivory Tower", so many web standards advocates view web design with an avid attitude.

4. It is easier to use tables for some things.

I'm sure we all have found that we have written quite complex CSS in order to implement the functionality of using tables as a piece of cake. For example, to process the appearance of a form, a complicated and weird form can also be easily handled using a form. You can use the floating element of CSS to achieve similar results, but it is much more troublesome. If you are a CSS guru, this is also a pleasure. There is no doubt that if you are just an ordinary person and a boss who will throw your throat and ask you how to make a small form for so long, things will be less fun.

If you have enough knowledge and patience, you can still use CSS to do most of the things you are used to using tables. Although it takes a long time, there is still a limit (or it is hard to give up trying ). The key is that there are some things you can't implement, no matter how hard you work, one of them is the page footer ). I often see posts from frustrated CSS authors who try to create footer columns that can be stuck at the bottom of the window to ensure the effect even if the window is not stretched to the whole screen. If a table is used, it is very simple to make this effect. You can use CSS alone to do it. Why are Web developers reluctant to use CSS? This is because, once no table is used, simple things become complicated.

V. Exaggerated benefits

There are many reasons for you to discard tables and adapt to CSS-based formatting. Many people exaggerate the benefits of pushing web standards. The conversion of large websites to CSS layout can indeed save a lot of bandwidth. For most other sites, the benefits are negligible.

We all hope that the page loading will be faster, and the standard advocates also say that CSS can help you do this. The "design" of most sites is evenly distributed across the entire site, but the "design" based on CSS is placed in one to more files. These files will soon become very complex and large, even for a small site. A site I recently designed uses four style sheets, which are 12 k in size (although including blank and comments ). CSS is used to load data in a concentrated manner before browsing, rather than evenly distributing the data to the entire site. That is to say, it takes longer to download the homepage than to use table layout. However, if the style sheets have been downloaded, they will be cached and do not need to be downloaded again. After all, the homepage of a website is the one that you do not want to load so slowly.

6. Attract customers

Even if web designers sometimes feel it is necessary to sell their websites to customers in line with web standards, most customers do not care about the quality of site code. We generally use carrot to increase the size of the stick, such as the friendliness to search engines, and the big stick is the accessibility of web pages ).

Indeed, search engines prefer semantic tagging pages, and everyone thinks that search engines like short code, the construction of websites through CSS and web standards can greatly enhance the development of websites that are friendly to search engines. However, there is no silver bullet. Many table-based sites still have high search engine rankings. Websites developed with CSS may also get only one bad ranking. The key to high ranking is content and links from other places, rather than using tables or CSS for formatting.

In addition, with respect to the customer's reverence for the word "affinity" to launch web standards, especially CSS design, there is actually no inherent affinity defect in table-based design. As long as the table is linear, it makes sense, the content has an affinity. The current screen reader technology is already good, and most screen readers can well support table-based sites. Of course, it is best to pass the AA affinity level for your website's syntax. Even for more rigorous AAA levels, it is just a suggestion without table design.

Another common benefit is that customers can be independent from design providers. In a world where everyone is developed according to standards, it is easy for customers to change their development partners. New developers can quickly understand the organizational structure of the site, without the need to mark the previous person. However, this requires a large number of design providers to be proficient in web standards. Unfortunately, this is not the case now. Although the number of experienced CSS developers is increasing, this is still a relatively professional field. Therefore, large companies are still at risk of locking in this development method-lack of skilled developers. My personal experience is that if an organization wants to use CSS to develop websites, it will be sufficient to maintain at least one experienced designer for a long time. Therefore, the transition to web standards is not to reduce the customer's dependence on developers, but to increase.

VII. Summary

Without a doubt, web standards and CSS-based design are the path to the future. However, when we rush to them and advocate new technologies, we may doubt whether what we advocate is too exaggerated. It is more realistic to do something that often fails to meet our expectations. The implementation of these rules by dogma is likely to alienate the partners we should win most.

Table-based design may take a long time. To attract developers, we can use instances to help them get started and lower the threshold. Let alone a new threshold. We have to face up to the benefits and costs in good faith. It may be difficult and time-consuming to develop a CSS site. In some cases, it is more meaningful to use a table for formatting than CSS.

Recently, everyone has been arguing over standards. In fact, some articles on these issues have been quite clear.

Here is my opinion. There are too many "I think" in this post, which means that I just want to discuss my ideas with you. Maybe there are too many mistakes, so please point them out one by one.

1. My Understanding of web standards

The so-called web standards have been concluded in some tutorials: Structured standards (XHTML, XML), performance standards (CSS, XSLT ?) , Behavior standards (DOM, ecmascript ). I will not talk about these things here. I only want to talk about my own ideas:

A. The standards are relative and have certain limitations.

As a standard, it is constantly improving. We can also improve it, rather than blindly following it. There is no best, only better. (Lexrus said a while ago that they wanted to set up their own web standard organization. I don't know what's going on now .)

B. standards are only recommended for use. Good standards will be observed by everyone.

We use standards because they benefit us. Just like the ISO9000 standard, it is only advocating and not forced. I think it is useful to me, so I use it; similarly, if you think it is really not good, you can also not use it, the standard itself should not carry any forced. Just like playing basketball, the NBA is a 24-second attack, and we are a 30-second attack. To join the NBA, we have to use other people's rules. We can also join the "World Trade Center". If we are arrogant enough to set up a "World Trade Center" ourselves and release a set of standards, we can also.

C. The standard does not explicitly mention whether to use Div or table

Some friends easily equate the standard with "change table to Div ". I don't think so, because tables also comply with XML rules. Pages with tables can still be verified by xhtml1.0.

D. "Div layout" is not just layout with Div

We can use all possible labels (including tables) to deploy pages, so as to achieve the best. It is just a new concept. Someone in the jar also said, "It is important to update ideas, not code ." Of course, our ultimate goal is to update the code.

E. XHTML verification is a means, not an aim

Sometimes, we use JavaScript to generate Flash Movie code to spoof validator and pass verification. In this way, there is no page that cannot pass the verification. If it's just fun, you can. However, I am afraid that some beginners take validator seriously and even think that passing verification is the ultimate goal. My opinion is: validator is just a tool that helps us check whether our pages comply with standards. In the end, we still have to design our page according to the customer's requirements.

2. Why should I use standards?

Some people think that the purpose of using the standard is to achieve the standard. In fact, website reconstruction breaks the ground: to make the website "active" for a longer time, to improve the accessibility of the website, and to reduce costs, we must adopt web standards! Here there are three "for", none of which is for the standard. The standard is just a means.

After getting started with the "standard", I tried to make some pages that comply with the "standard. At that time, it was not clear why standards were used, but out of curiosity. There were also some problems in the middle, either technically or conceptually. However, I am happy to use Div + CSS to create webpages for customers.

After using the standard, I feel that the code is simplified and the maintenance is convenient.

The code is streamlined to shorten the page loading time. Even under the current broadband condition, we should not relax our requirements-streamline the code (I think this is also the requirement of every programmer ), besides, there are still many dial-up users, as well as those who use mobile phones to access/browse the Internet. This is a competition in seconds.

Higher compatibility can be achieved by strictly following the standards. A qualified Web Page Maker always tries to make the webpage the most compatible. Of course, he wants to strike a balance between effect and compatibility. Just like choosing a husband: You need both money and money.

It is easy to maintain. I even need to modify CSS to make the whole page show a completely different style. This can save a lot of work.

Of course, I think the most important thing about using standards is backward compatibility. In a professional term: sustainable development. The network is always evolving. A good Web Page Maker must have a certain foresight for future development. Now I know that it will be the world of XML in the future, until something better will replace it.

Every year, too many websites spend a lot of money on the revision to keep up with the times. Because the revision means that everything comes back, including code and even programs.

The standard also requires us to hand over the data to XHTML (or HTML or XML), and give the performance to CSS. The two perform their respective duties and combine them.

3. Table Smoothing

After the book "website reconstruction" is published, there may be a lot of misunderstandings. Some friends confuse the standards with the reconstruction, or even the same. I have never read this book, so it is hard to evaluate it.

"Without changing the external behavior of the code, you can modify the code to improve the internal structure of the program. I think "website reconstruction" has both the meanings of "Div layout" and "web standards. The layout is about a method. The standard is about a specification, which is a matter of two.

The Web Standard does not mean that no table is used. I searched for articles on the Internet and did not find an article saying that the Web standard is against the use of the table label or even suggested not to use the table label. I think it is like this: we recommend that you use Div + CSS instead of table layout ".

Taking a data table as an example, I think using table to organize it is the best solution. Of course, you can use other methods to achieve this, but I dare say that there is no simple and concise table. (Maybe, but I didn't find it ?) Of course, in the learning stage, it is quite useful to force yourself not to use tables to solve all problems.

The above is a summary of everyone's thoughts rather than my thoughts. But don't smile. If it is helpful to beginners, it will be Amitabha.

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.