Global 1.0/CSS XHTML International standard customs clearance tips

Source: Internet
Author: User
Keywords The Consortium

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Yesterday the site (http://www.tangzhehao.com.cn) from the XHTML1.0 has 121 errors and CSS nearly 10 errors, I used nearly two hours, will all the wrong to fix. Accumulate skills as follows, share the discussion with you. In order to impress everyone, we use the edge to do the problem, edge summary method.

Global Standard XHTML 1.0 International standards:

The first question: What's wrong with the statement in <div class=tzh>i am tzh!</div>?
1. Punctuation problems. This is actually the most easy to ignore the problem, in fact, is a small two quotes, it caused this error. Although many browsers still recognize rendering correctly without quotes. However, it is impossible to pass the strict international standard of XHTML, please remember that the sign must be followed by the number. Correct wording: <div class= "Tzh" >i am tzh!</div>

Question number two: what is wrong with the statement in the <span class= "Tzh" >tzh is me!</span>?
2. Note the case. This, like the first question, is a particularly easy to overlook detail issue. Uppercase is absolutely not allowed in the standard of the consortium, and I still remember that when I was testing a piece of JavaScript code, I was judged to be mistaken for the onload I had written at a glance, because l could not capitalize. Correct wording: <span class= "Tzh" >tzh is me!</span>

Question number three: what is wrong with this statement in <p>i am Tzh!</p><br><p>tzh is me!</p>?
3. <br/> Label problem. For forced-wrap labels <br/>, many beginners can not tell the difference between it and <br>, even in the FCKeditor editor sometimes out of a <br> to act as <br/>. Although many browsers can automatically correct the error, the <br> is recognized as a <br/>. But the best way to edit or recommend that you use Dreamweaver for editing, when you press CTRL, will automatically write a <br/>. Correct wording: <p>i am tzh!</p><br/><p>tzh is me!</p>

Question fourth: What are the errors in the <h1>~tangzhehao~hey~</h1> statement?
4. Note that after the tag end of the punctuation, a lot of labels after the end can not connect special punctuation, such as here, "~" wave number, but you have to ask, that I how to use it? Then use the ISO Latin-1 character set (ISO Latin-1 Character set), where the character set decimal encoding corresponding to the "~" Wave number is & #126, and then the decimal code is substituted for the wave number, remembering that the last semicolon cannot be lost. In the ISO Latin-1 character set, a named entity (Named entity) is preferred, decimal code (decimal code) Second, that is, a symbol takes precedence over a named entity rather than a decimal encoding when it has both decimal-encoded and named entities.
P.s.:iso Latin-1 Character Set address: http://www.tangzhehao.com.cn/css/z_iso.html

Question fifth: What is wrong with the <form id= "54tzh" ></form> this statement?
5. Note ID and class special case. The XHTML1.0 standard stipulates that in ID or class, the first character cannot be numeric and must be a letter. Correct wording: <form id= "tzh45" ></form>

Question sixth: What are the errors in the <img src= "logo.gif" > this statement?
6. <img> Label note. The XHTML1.0 standard of the Consortium stipulates that the ALT element must be included in the <img> label. Correct wording: <img alt= "Logo" src= "logo.gif" >

Question seventh: What's wrong with the <script language= "JavaScript" > this statement?
7. <script> label note. The XHTML1.0 standard stipulates that the type element must be included in the <img> label. Correct wording: <script language= "JavaScript" type=text/javascript>

Question eighth: What is wrong with this statement in <div><h1>i am tzh!</div></h1>?
8. Note that the label begins at the end of the sequence. Correct wording: <div><h1>i am tzh!</h1></div>

9. Note the special suit. such as:<dl><dd><ul><li> and other special tags, the package sequence is indispensable. The <dl><dd><ul><li> four labels must be written in order. There are a lot of similar.

10. Note that the label is not open. The so-called did not open from the detection of the consortium, this type of error is displayed error is not open, translation is not open meaning. If you understand the meaning of Chinese, there is a first or a tail without a head. Often this error occurs because a piece of code is deleted at the time of modification without regard to the relatively distant end or start tag.


Global standard CSS International standards:
1. Use less side doors. Like Break-word line breaks, Z-index manual layering, and vertical alignment, and so on, these partial-door CSS is best to use, because not all browsers are supported, and it is extremely difficult to pass the Internet.
2. Center is not a float value. Many beginners mistake Center for the value of float, but that's not the case. Center is just a text-align value.
3. Alignment cannot include two values. Many beginners fill in two values in float or text-align, such as Float:left top. This is not allowed and is not recognized by browsers.
4. Scroll bar color is best not customized. Many browsers do not normally recognize a custom color scroll bar, and many custom colors do not go through the web.
5. Separate scroll bar settings. Now often use overflow-x (horizontal scroll bar) or overflow-y (vertical scroll bar), in the setting of this will often find that not all of the client has effect, everyone in the setting when the body and the HTML is best to set. However, this CSS is not supported by CSS2.1 (CSS2.1 supports overflow and defines horizontal scroll bars) until CSS3 supports this definition. Try to use less.
6. Background and color colors are subject to warning.

In the end, if your station passes the test of the consortium, it will be detected through the Certified logo of the Consortium, the following figure (the image on the left is the same as the XHTML 1.0 of the Consortium, and the right image is through the CSS):

For the moment is the above, if you feel that there is anything you can communicate with each other, you can contact me http://www.tangzhehao.com.cn

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.