Validation
What is HTML validation?
World Wide Web Consortium (W3C) allows internet users to check HTML and XHTML documents for well-formatted markup.
Markup validation is an important step towards ensuring the technical quality of web pages.
It checks your HTML against the official HTML specification.
Why is it important?
If your website does not pass validation it may suffer from errors across different browsers or poor traffic owing to poor formatting and readability.
While it's not required to publish a website or page, it is a good habit to validate your webpage after development, or after major changes.
Benefits:
- Help Improve Rankings in Search Engines
- Validation Helps Teach Best Practices
- Improved Website User Experience
- Make Website Browsers Friendly
- Cross-device Compatibility and Accessibility
- Validation Help for Easy Coding and Maintenance
- Validation as a Debugging Tool
How do we validate?
You can pass a URL or HTML code into most validators
Useful resources:
Common issues
- Missing closing tags
- Incorrect tags
- Unrecognised attributes or their values
- Block elements inside inline elements
- Missing
alt
attribute - Duplicate
id
attributes