Temple College Logo R. Craig Collins >Common > How To: Check for errors in HTML

How To: Check for errors in HTML © R. Craig Collins, 2005

  1. Make sure you are starting with
    <html>
    <head>
    <title>
    </title>
    </head>
    <body>
    </body>
    </html>
  2. You only use <body> </body> once, and all the items to display in the main browser window go in between.
  3. When constructing a web page in HTML, it is important to build up your page one item at a time; not all at once, and not in a linear fashion. That is, don't start typing from start to finish, then look at the browser.
  4. Be careful spelling; if copying something, make sure it is plain text and don't use word processors.
  5. Separate components with a space
    <tag attribute="value" attribute="value" attribute="value"> </tag>
  6. When looking at a web page's code, the error is almost always above where it starts to look wrong in the browser. A bug chunk of a web page will disappear if you miss a " earlier in your code.
  7. You only use <body> </body> once, and all the items to display in the main browser window go in between.
  8. Many times you have compound mistakes (if you don't add a piece at a time, as recommended)... fix them one at a time, and test the code before moving on.