You are here

We need to add one last bit of coding to our web pages. This is the DOCTYPE tag, and tells web browsers what sort of web page you have created. Here's a common one for basic HTML pages:

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

What this says to web browsers is that this is a World Wide Web Consortium-okay document that is using HTML 4.01 transitional coding. You can copy and paste this into your index.html, as well as any other pages you may have created. It goes at the very top of your file, above the opening HTML tag. 

As you write HTML code, you will make mistakes -- everybody does. That is why there are HTML Validators (or checkers). They look at your HTML code and find errors like missing or misplaced tags.

To check your index.html file, you will use W3C HTML Validation Service because it will check the HTML code for files that are on your local computer.

  1. Click on this link (it will open in a new window): W3C HTML Validation Service
  2. In the W3C HTML Validation Service browser window, click the upload files link below the Validate this page button.
  3. Click the Browse button next to the Local File: box to find the index.html file you have been building on your computer.
  4. Doubleclick index.html
  5. Click the Validate File button on the W3C HTML Validation Service page.
  6. The W3C HTML Validation Service will display a page listing any potential problems in your HTML.
  7. If there are errors, open the index.html file in Notepad and fix them.
  8. Resubmit the page to the W3C HTML Validation Service following steps 2-5.
  9. Preview the corrected page in your web browser.

Congratulations! You now have an error free web page!

Checking for Accessibility

Another issue to think about when you build web pages is accessibility. Special needs users may not be able to see pictures on your pages, or may use special web browsers that don't display code the way most web browsers do. You should be designing pages that can be used by everybody.

To read more about current standards and how to make your pages accessible, check out the website. You will find useful links to design guidelines, checklists, and advice on what you can do to your pages to make them more accessible.

You have now reached the end of this tutorial. Congratulations!