1. Do not worry about the validators warning: If the validators say 12 errors and 83 warnings are found, ignore them and proceed to the next step.
2. correct an error at a time: make progress in sequence, and correct an error at a time from top to bottom. HTML is browsed from top to bottom in a browser. These errors are displayed in the same order.
3. Refresh the code after each correction to make it take effect again: a small error often leads to a crash error on the whole page. Therefore, if the operation is improper, "corrected error" may also lead to more errors. Make the Code take effect again after each correction, so that the problem can be completely solved.
With the above basic exceptions, let's take a look at the reasons for the ineffective layout design.
1. The div tag is not closed.
This is one of the most common causes of layout design failure. We are always surprised when we learn how many exquisite forum designs are ineffective. Opening div labels is one of the most common design mistakes and one of the most difficult mistakes to diagnose. The validators sometimes point to the wrong option to enable the div tag, making the diagnosis as troublesome as a haystack.
Ii. troublesome embed labels
In the early 1990s S, Microsoft and Netscape browsers began to recognize nonstandard, unique fonts. Unfortunately, this means that W3C validators are not yet able to identify certain key HTML tags, such as "embed", even if these tags are already widely used. If you really want to get a strict DOCTYPE (document type) Verification, you can only discard nesting.
If you want both the layout design and embedded media to take effect, try the Flash Satay method.
3. Improper DOCTYPE statement
DOCTYPE is not declared, or DOCTYPE is declared incorrectly at the beginning of the file, which is also a common error. According to general experience, Strict DOCTYPE is the highest level of validation that everyone pursues. Strict validation indicates that your webpage can be best displayed on all browsers. For more information about the DTD document type declaration, see articles on 52CSS.com.
4. Diagonal lines at the end
If your website cannot be verified, it is likely that a backslash is missing somewhere in the code. We can easily ignore things such as ending slashes, especially in elements such as image labels.
In strict DOCTYPE, this is invalid. Add "/" at the end of the img tag to solve this problem.
5. Align tag
If DOCTYPE is set to Transitional, you will use the "align" label, but if you want to get Strict verification for a higher requirement, you will see many errors. Align is another label that cannot be used for layout design. You can try to replace the align conversion element with "float" or "text-align.
Vi. JavaScript
If Strict DOCTYPE has been declared, the CDATA tag must be overwritten in JavaScript. This aspect of the validators makes it difficult for many programmers because websites tend to use embedded JavaScript for advertising and tracking scripts. If JavaScript is required, add the following labels before and after it:
7. The image requires the "alt" attribute
You may not have noticed that images are also a potential obstacle to advanced verification. In addition to trailing slashes, advanced verification also requires the use of alt tags to describe the image, such as alt = "Scary vampire picture ".
The search engine also uses alt tags to identify images on the web page. Therefore, adding alt tags is always good.
8. Unknown Entity Data
Entity Data is another mistake that affects verification. We can consider replacing "&" with appropriate encoding characters. The entire list lists the appropriate encoded character entity data available in the XHTML section design.
9. Poor nesting
Nesting is an element that includes elements. We can easily confuse the order of nested elements. For example, enable the strong label before the div label, but disable the div label first. This may not change the layout of the forum, but will invalidate the design of your forum.
10. The "title" label is missing
Although this seems to be a very obvious mistake, many programmers (including myself) often omit the title tag in the "head" section. When you see "missing a required sub-element of HEAD" (a child element is missing from the HEAD), you will find that you forgot to add the title tag.
Http://www.cnblogs.com/MaxIE/archive/2010/04/23/1718690.html