18 min read
Validating and Testing Your HTML
Check your code with the W3C validator, fix common errors, and test every page in different browsers and screen sizes.
The W3C Markup Validator
The W3C Markup Validation Service (validator.w3.org) checks your HTML against the official rules and lists every error with its line number.
- Open validator.w3.org.
- Choose Validate by File Upload (or Direct Input and paste your code).
- Press Check and fix errors from the top — one early mistake can cause many later messages.
- Validate every page.
| Common validator messages | ||
|---|---|---|
Browser and Device Testing
Valid code is not enough — check how the site behaves:
- Open every page in at least two browsers (for example Chrome and Firefox or Edge).
- Use the browser's device mode (F12, then the phone icon) to check phone and tablet sizes.
- Click every link, submit the form, check every image loads.
- Try the page with the keyboard only (Tab through links and fields).
Recording Your Tests
Practice
Select the checks you should do before submitting a website.
Choose all that apply.
More lessons in HTML · Next: Website Practice Paper · Previous: Frames and iframes
