How to Validate Your Web Page Code

Use valid HTML. Validate your HTML. Have you heard advice like that? This article will explain what that means and how to do it.

Things You'll Need

  • A web page in progress or completed
  • An Internet connection
Show More

Instructions

    • 1

      Valid HTML is HTML that follows a set of rules correctly. Those rules generally come from the World Wide Web Consortium (W3C).

    • 2

      The rules are called DOCTYPES. There are three possible DOCTYPES for both HTML and XHTML pages: strict, transitional and frameset. When you prepare a page of HTML you declare one of these DOCTYPES at the top of the page. If you follow the rules the W3C set up for your chosen DOCTYPE, you have valid HTML.

    • 3

      To validate your page, use the online validation service provided by the W3C (see link in Resources below). Enter a page URL or upload a file and the validation service will check it against the DOCTYPE given on the page.

    • 4

      If you get it perfect, the validator will tell you so. If you have a problem, the validator tells you exactly which line of your code it's in. And it tells you what to do to fix it.

    • 5

      Why is valid HTML such a big deal? If you follow the rules, the browsers do a better job of making your page look the way you hope it will. If you don't follow the rules, browsers try their best, but the page may not look the way you want or look the same in every browser.

Related Searches:

Resources

Comments

You May Also Like

Related Ads

Featured