AD JB Toolbox 01 EN

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.

  1. Save the latest version of the HTML file.
  2. Select the appropriate input method and start the check.
  3. Read each message and inspect the reported location plus nearby opening and closing tags.
  4. 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.

More in This Category
HTML Tutorial / When to Use div and span

HTML Tutorial / When to Use div and span

Understand the structural difference between div and span, style only the content you need, and choose semantic elements when they better describe the content.

HTML Tutorial / Accessibility Basics: Headings, Links, Images, and Keyboard

HTML Tutorial / Accessibility Basics: Headings, Links, Images, and Keyboard

Review heading hierarchy, meaningful link text, image alternatives, and keyboard interaction as practical foundations of accessible HTML.

HTML Tutorial / Table Basics: table, tr, th, and td

HTML Tutorial / Table Basics: table, tr, th, and td

Build a basic HTML data table with rows and header or data cells, then organize its headings and body without using tables for page layout.

HTML Tutorial / What Is HTML and What Does It Do on a Web Page?

HTML Tutorial / What Is HTML and What Does It Do on a Web Page?

HTML gives web content structure and meaning. Learn how it differs from CSS and JavaScript, see how basic markup appears in a browser, and make your first HTML file.

HTML Tutorial / Choose Input Types for Email, Numbers, Dates, and Choices

HTML Tutorial / Choose Input Types for Email, Numbers, Dates, and Choices

Choose input types based on the value being collected and understand how checkboxes and radio groups behave when submitted.

HTML Tutorial / Divide a Page with Semantic Elements

HTML Tutorial / Divide a Page with Semantic Elements

Learn when to use header, nav, main, article, section, aside, and footer, then build a complete page whose regions and in-page links work together.

HTML Tutorial / Links: Paths, Page Fragments, and Email

HTML Tutorial / Links: Paths, Page Fragments, and Email

Create HTML links with absolute or relative URLs, jump to a document fragment, and add email, new-tab, or download links. Learn what to verify before publishing.

HTML Tutorial / Responsive Images: srcset, sizes, and picture

HTML Tutorial / Responsive Images: srcset, sizes, and picture

Offer image resolutions with srcset and sizes, and switch crops with picture. Downloadable files let you test the examples in a browser.

HTML Tutorial / Explain Forms with fieldset, legend, and autocomplete

HTML Tutorial / Explain Forms with fieldset, legend, and autocomplete

Group related controls with fieldset and legend, and use suitable autocomplete tokens to describe the purpose of input fields.

HTML Tutorial / Images: img, Alt Text, and Dimensions

HTML Tutorial / Images: img, Alt Text, and Dimensions

Add an image with HTML img, write useful alternative text, and set width and height correctly. A downloadable example helps you test file paths and sizing.