- Document Encoding Problems
- Missing DOCTYPE Declarations
- Use of language Attribute in script Elements
- Missing type Attribute in style Elements
- img Element Errors
- Unnecessary Use of Proprietary Attributes
- Un-escaped Entities in XHTML
- Finding Redemption
3. Use of language Attribute in script Elements
If you use JavaScript with any frequency, surely you've seen syntax like this:
<script language="JavaScript 1.1"> . . . </script>
The language attribute was formally deprecated in HTML 4.01. As a result, it cannot be used in HTML 4.01 Strict, XHTML 1.0 Strict, or XHTML 1.1. The only problems that might possibly be encountered by removing this attribute influence browsers that are so old that some readers weren't born when they were in use. Okay, I'm exaggerating, but you get the point. In almost every contemporary case, eliminate the use of the language attribute.
However, the type attribute is required. So, instead of your script elements looking as they do in the prior code sample, your script element should look like this:
<script type="text/javascript"> . . . </script>