Common HTML 4.01 Mistakes
- missing or misused alt= attribute in <img> tags.
- "&" should be "&"
- ID's should be unique; they should apply to only one element per page.
- ID's and names can not start with a number.
- The HTML height= attribute is not valid for <table> elements; use CSS instead.
- The HTML bordercolor= attribute is not valid; use CSS instead.
- <center> and <div align="center"></div> are deprecated. Use CSS instead.
- problems with <font> tags, that include misplaced or missing end tags. However, since the <font> element is deprecated in favor of CSS, people should really use CSS instead. The <font> element is also considered harmful. (Keep in mind that that article is a few years old, so what it says about Netscape 2 and 3 is no longer accurate.)
- missing DOCTYPE, for example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">.
- missing <meta> content-type tag, for example: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">.
- missing <title> element.
- <title>, <meta>, <link>, and <style> elements outside the <head> element; they should be in it.
- misplaced tags that belong in the HTML <head> element.
- missing or misplaced <head> and <body> tags.
- valign="center" should be valign="middle"
- missing action= attribute in <form> tags.
- misplaced <form> tags. <form> can not be a direct descendant of <table>.
- Using <embed>; use <object> instead.
- <marquee> is a proprietary IE element that has been supported by some other browsers as well for better crossbrowser support. You should not use <marquee>. Instead use JavaScript or a Java Applet.
Related Links:
Last update: 2009-10-11