HTML Tutorial / Find Errors and Validate an HTML Document
HTML validation helps find markup mistakes that a browser may quietly repair, such as malformed attributes, unexpected closing tags, or duplicate IDs. After fixing reported issues, you still need to check the page's actual content and interactions in a browser.
Save and inspect the page first
Save the current HTML file and open it in a browser. Check that headings, paragraphs, links, images, and forms appear where expected. A visible page is not proof that its markup is valid: browsers can recover from some errors and display a result different from the structure you intended.
Run the Nu HTML Checker
The Nu HTML Checker can inspect a public URL, an uploaded file, or pasted markup. For a local or unpublished document, use file upload or direct input. Do not upload source files containing passwords or personal data to a public validation service.
- Save the latest version of the HTML file.
- Select the appropriate input method and start the check.
- Read each message and inspect the reported location plus nearby opening and closing tags.
- Fix the file, save it, and run the check again.
Start with the earliest error when many messages appear. A single malformed attribute can cause several later messages. The line where an error is detected may not be the line that caused it; an unclosed quotation mark, for example, can make the next tag appear invalid. Make sure you reupload the saved revision rather than repeatedly validating an older file.
For instance, this markup repeats one id:
<label for="email">Email</label> <input id="email" name="email" type="email"> <label for="email">Confirm email</label> <input id="email" name="email_check" type="email">
Change the second field's ID to email-check and update its label's for to match. Then check that the duplicate-ID error is gone and that each label focuses its own input. A short tag is not automatically wrong: some elements, including li in certain contexts, may omit their closing tag under HTML rules.
Validation is only one kind of check
A syntax checker cannot guarantee that a link reaches the right article, alt text explains an image, or a server handles a form correctly. Open links, use the page with a keyboard, and check a narrow viewport. For missing media, investigate paths, server responses, and supported formats as well as markup.
Know what you validated: a file upload checks that file, while a URL check inspects the document a server actually returns. On WordPress, a theme wraps the article body, so checking a manuscript fragment and checking the complete published page can produce different results. Separate problems in the article from issues introduced by the theme or a plugin.










