Some of my thoughts on Web Standards Note (a) _ Experience Exchange

Source: Internet
Author: User
I have been learning web standards since the beginning of last year, and two years have some experience. Recently job-hopping just busy at home, write some out and communicate with you.

1 understanding of Web standards and the XHTML specification

According to the customary understanding, these two concepts all seem to refer to one thing (that is, we discuss in this version of these "Advanced Theory" ^_^). But I think, in fact, technically speaking, these two things have little relevance. Web standards in short is the structure of the page, performance and behavior of their own independent implementation, more commonly speaking is now the popular language "DIV+CSS" recruitment. However, none of the versions of XHTML has limited the concept of web standards. Obviously, we can use XHTML 1.1 to write a table-positioned page. Speaking of which, I might think I was talking a bunch of crap. But any technology can only be used correctly when you have a clear understanding of the basic concepts. Let me talk about the two misguided trends in Web standard applications today in two ways:

The first case is simple. I think that as long as the use of XHTML+CSS is the Web standard. The pages are filled with class and ID. Arbitrarily define class for each detail. The difference between such a page and the traditional HTML is that there is a "/" in the IMG tag. In fact, this is not as good as returning to the traditional HTML, at least I can easily use the font, rather than always look up to the dictionary as the style sheet. Another more subtle use of CSS at random I will speak later.

In the second case, I find it difficult to understand that you are trying to achieve the performance you want with a variety of complex div nesting and CSS statements. A very simple example of a post I just saw "no transduction page fillet". First of all I want to be sure that this idea is really good, using the CSS function to "draw" the fillet. To do this, the designer must add a large segment of code to the appropriate location:




However, this is a serious violation of the basic concept of web standards-structure and performance to separate. Because it puts the code that controls the performance of the Web page in the structure document. You might say that it actually puts the real performance code in the CSS. But I think it's a concept of substitution. Because these B-tags are not related to the structure of the Web page, they are empty tags. That is, it does not exist to place some content where the document structure requires it. So they are just some scrap code for the document structure.

Another example may be more covert. Before I have seen on the alistapart.com how to implement the Web page three-way bar article, the principle is probably to use three or four div nested each other. I think this is also a violation of the Web standard idea of practice. Because these div tags are placed in the code of the order is not purely for the needs of the structure, but for the performance of the Web page.

Of course, I admit that the above views in a certain degree is a dead-point (but in turn, not to achieve non-picture fillet is not in the dead, hehe). Sometimes the structure and performance are not so easy to separate, and we have to make the structure to accommodate (think of the use) in order to achieve some rich performance. But it is important to know what is right and what is wrong. Even if we have to do something wrong sometimes.

Finally, I would like to state that I am not a "non-picture fillet" that is meaningless or wrong. I also admire the author's cleverness and inspiration. I think this kind of technical research is just like using CSS to draw the flag, which is very helpful to the mastery of CSS technology. However, its use should be only as restrictive as the CSS flag, and should not be adopted in practical applications. Because it violates the basic principles of web standards.
  • Related Article

    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.