Valid Markup

Markup is the use of HTML to identify elements within a page.

Markup makes content accessible by following established rules and working as expected with different browsers and assistive technologies.

Valid markup makes content more usable and accessible for people who use assistive technologies, or have a preferred browser or device. Valid markup is required by digital accessibility standards, as described in Success Criterion 4.1.1 Parsing.

Best Practices

The rules of the HTML used to create web pages are straightforward, but there are several HTML types and the rules vary by type. The good news is that your web page specifies its HTML type, and automated testing provides a quick and efficient way to check the validity of your page.

Valid markup ensures that assistive technologies can handle web pages as intended. Beyond this, valid markup:

  • ensures a consistent and expected display appearance
  • helps search engines index and rank your pages
  • minimizes unintended behaviors in highly interactive pages

Check If Markup is Valid

When reviewing or editing content, check your pages with one of these free tools:

  • W3C's Markup Validation Service is a web page checker that offers line-based error reporting and suggestions for correct HTML
  • axe Dev Tools is a Chrome extension that provides fuller error explanations and resolution techniques

Both tools will find errors; you or technical staff will need to make the fixes in your HTML.