How To Validate (Error Check) A Web Page

Learning how to error check your HTML code is one of the most important things you can do for your web page. Plus, it is a good first step towards using web design standards.

In the video below, I go through the process of checking a page’s markup with the W3C Markup Validation Service. You’ll see how to upload the file and how the validator checks the code, line by line. It flags any tag that is out of sequence or incomplete. It gives you the location of the line where the error occurred, so the HTML can be corrected and the file re-validated.

Running Time: 10:30.

Check your HTML to see if it’s good with the W3C Markup Validation Service.

Fortunately, both HTML and XHTML have a very simple syntax. Once you understand it, you will be able to work smoothly with these markup languages. They are a lot like grammar, in that there are rules you have to follow. Here a few rules to remember (and it’s exactly what the validator is checking):

  • Every open tag, such as <div>, must have a closing tag, such as </div>.
  • The tags are closed in the reverse order in which they are opened within a block. For example, <strong><em>……</em></strong> when italicizing and bolding some text.
  • Some tags are "empty" tags as they don’t have an open and close tag. Examples include <hr />, <br /> and
    <img />.
  • Character entities, like &copy;, &fract12; or &amp;, for example, are used for non-alpha numeric characters.
  • XHTML is written in lowercase.

The more you use the validator, the less you will have to use it because you are learning how to write good HTML/XHTML. However, writing good HTML/XHTML doesn’t mean you understand how to correctly use the tags to give meaning to your content. As I explain later in my video, that’s something only humans can do for now and in the foreseeable future.

Share

What Do You Think?

Your email is never published nor shared. Required fields are marked *

*
*