Skip to article
SEOOct 20, 20263 min read

HTML validation: understand errors and verify fixes

Check a published page’s HTML, distinguish errors from warnings and verify template changes without removing useful content.

HTML form structure and a green validation check under a magnifying glass

An online HTML validator helps identify markup problems on a published page. Its report is a starting point: locate the cause in the source code, make the correction and check the published page again. Valid HTML does not rule out navigation, accessibility or indexing problems.

Choose a representative page

Start with a product page, article or landing page. Use the final URL after redirects. If the site uses different templates, keep at least one representative page for each type. A successful check on a product page does not cover the cart or contact form.

Run the Milten HTML validator. Save the URL, date and report details needed to locate the issue. If a check does not complete, record its result as unverified.

Turn a finding into a correction

Illustrative example without customer measurements: two form fields share the ID email. Give each field a unique ID and update the for attribute of its corresponding label. Verify that each label is associated with the correct field.

Don't just remove an attribute to make a warning go away. Check the component that produces the HTML and the pages that reuse it. If the diagnostic mentions a position or an element, use this information to find the code.

The W3C Nu Html Checker also checks markup conformance. Its diagnostics do not constitute a complete user experience audit.

Distinguish between HTML, accessibility and SEO

A coherent heading structure helps readers understand a page. Test forms with the keyboard, checking that focus is visible and fields have understandable names. Supplement the review with an accessibility audit; automated checks do not cover every accessibility requirement.

For indexing restrictions, canonical URLs, and metadata, use the SEO audit. An HTML correction does not guarantee indexing or a better position in Google.

Investigate CSS findings before removing rules

Another illustrative example: a rule is unused in the initial page state but needed when a menu opens, at another screen width or on another page. Test those states before deleting it. Chrome DevTools Coverage records used and unused code during the observation period, including the actions performed.

The CSS scanner helps examine page styles. After editing, test menus and forms at mobile and desktop screen widths.

Check the fixed version

Publish the correction, check the same URL and compare the original finding with the new result. Verify that useful content and links remain available. Repeat the relevant checks on other pages using the modified template.

Does the validator fix the code?

No. It supplies diagnostic information. You edit the component or template, then verify the published version.

Should all warnings be removed?

Assess each warning’s cause and impact. Fix confirmed errors, document intentional exceptions and test important interactions manually.

Start an HTML check. For loading issues, read site speed and SEO.

Reference: associate a label with a field.

Website speed check

Find out what slows your website down

Check your page with Milten to see its Core Web Vitals and get recommendations for faster loading.

Check your website
Cookies

We use cookies

We use cookies to give you a better experience on our site. You can learn more about how we use cookies in our privacy policy.