Happy Validator Lines of Code

Here are some bits of code you need to keep the W3.org validator and your instructor happy.

  1. Copy and paste this line of code before the opening <html> tag.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    This line of code lets the validator know which type of HTML you are using.
  2. Include the XML namespace attribute (xmlns="http://www.w3.org/1999/xhtml") in the <html> tag. It looks like this:
    <html xmlns="http://www.w3.org/1999/xhtml">
  3. Copy and paste this line of code between the <head></head> tags for pages that will be hosted on the webhawks.org server.

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    This line of code lets the validator know which particular set of text you are using to write your code.
  4. Copy and paste this section of code just before your closing body tag (</body>).

    <p>
    <!-- validator code using text links -->
    <a href="http://validator.w3.org/check?uri=referer">Validate XHTML</a>
    &nbsp;|&nbsp;
    <a href="http://jigsaw.w3.org/css-validator/check/referer">
    Validate CSS</a>
    <!-- end validator code using text links -->
    </p>


    This code places a link to the W3C.org HTML validator (similar to the link at the bottom of this page) making it easy to check your page. Of course, these links only work when the page is uploaded to the server.

View HTML5 validation via this link!

bottom graphic for DM 60A pages