Validate your HTML and CSS with the W3C Validation Service

Just because your website displays the way that you intended does not mean that your code is valid. Browsers are great at making do with bad code and they won’t throw an error if your HTML or CSS is off. Clean code is easier for browsers to process and to read and modify for development purposes. There are a number of web page validation services, but this tutorial will cover how to use the W3C Validation Service.

  1. Go to the theĀ W3C Validation Service.
  2. If the file that you would like to validate is already on the web, you can input the URL of the file in the “address” field. Otherwise, change the tab to “By file upload” or “By direct input” and either browse for the file locally for paste the contents of the file. Click the “Check” button.

    W3C Validation Service choose validation method
    W3C Validation Service choose validation method
  3. The Validation Service will generate a list of errors, warnings, and validated CSS. Taking care of the errors is the most important step but you may also want to address the warnings.
    W3C Validation Service error example
    W3C Validation Service error example
    W3C Validation Service warning example
    W3C Validation Service warning example

    W3C Validation Service valid CSS example
    W3C Validation Service valid CSS example
  4. In order to take care of the errors and warnings, use the line numbers to find the code in your file.

Leave a Reply

Your email address will not be published. Required fields are marked *