Sean L. YoungStudio tools
Step 4 · Check & launch

HTML Checker

Paste a page's HTML, open a file, or fetch a page from the website. You get a list of what to fix: tags left open or in the wrong order, images and form fields screen readers can't describe, and details search engines look for. Every problem is explained in plain English and linked to its line.

What it's for

Browsers are forgiving. A page can have a tag left open, a heading in the wrong place or an image with no description and still look fine on your screen. But those mistakes can break the layout in another browser, leave screen-reader users stuck, or cost the page in Google.

The HTML Checker finds them before the client or their visitors do. Use it:

  • on every page before a site goes live
  • after pasting in code from another tool, a plugin or a tutorial
  • when a layout is broken and you can't see why (an unclosed tag is often the cause)
  • to check an existing site you've taken over.

Quick start

  1. Get the page in. Paste its HTML into the box, drop an HTML file on it, click Open file…, or type a page's address under Check a page on this site and click Fetch.
  2. Read the problems. They appear straight away, with errors first.
  3. Click a problem to jump to its line in the code.
  4. Fix it right there in the box. The list updates as you type.
  5. Copy the fixed code back into the page, or fix the original file.

Click Try an example to see a page with a few typical mistakes.

Getting a page into the checker

  • Paste: to get a live page's HTML, open it in a browser, right-click and choose View page source, then select everything and copy it.
  • Open file or drop a file: for pages on your computer.
  • Fetch: type the address of a page on the same website the checker is on, such as /about/, and click Fetch. This works once the Studio is on the website (on your own computer with XAMPP, it checks pages on localhost). Browsers don't allow it to fetch pages from other websites; for those, paste the source instead.

You can check a whole page or just a piece of one, such as a section you're about to paste in. With a piece, page-wide checks such as the title and description are skipped.

The code box works like the one in the Code Sandbox: coloured code, line numbers, Tab to indent, and Esc then Tab to leave the box. Your last code is kept in this browser until you click Clear.

The problems list

Each problem has a level, a group, the line it's on, what's wrong, and why it matters. Click it to jump to the line, which is highlighted in the code.

LevelMeans
ErrorSomething is broken, or will be for some visitors. Fix these.
WarningLikely to cause a problem, such as for screen-reader users or in search results. Fix these unless you know why it's that way.
TipCould be better or more up to date. Worth doing when you have time.

Use All, Errors, Warnings and Tips to show just one level.

Fix the first error first

One unclosed tag or quote can confuse everything after it. The checker is careful not to pile up knock-on errors, but fixing the earliest one and looking again is the quickest way through.

What it checks

Structure

  • tags that are never closed, closed in the wrong order, or closed when they weren't open
  • quotes and comments that are never closed (which swallow the rest of the page)
  • tags missing their closing >, and attributes with no space between them
  • elements in places they're not allowed, such as a heading inside a link's text, a form inside a form, or a list item outside a list
  • the same id used twice, or an attribute written twice on one tag
  • head tags in the body, and missing page parts such as the doctype, <html> or <head>.

The checker reads HTML the same way browsers do, so it knows which closing tags are optional and doesn't nag about them.

Accessibility

  • images with no alt text, or alt text that just repeats the file name
  • links and buttons with no text, which screen readers announce as just "link" or "button"
  • link text like "click here" that doesn't say where it goes
  • form fields with no label, and labels not connected to their field
  • headings that skip a level, such as H2 straight to H4
  • things that react to clicks but can't be reached with the keyboard
  • frames with no title, tables with no header cells, sound that plays by itself, and settings that stop people zooming in on phones.

Search & sharing

  • a missing, empty, very short or very long page title
  • a missing or badly sized meta description
  • no main heading (H1), or more than one
  • no Open Graph tags for shared links.

For help writing the title, description and sharing tags, use the Meta Tag Builder.

Good practice

Out-of-date tags and attributes, links that go nowhere or use http://, link addresses with spaces in them, buttons without a type, inline styles and click handlers, and images without a width and height (which makes the page jump about as it loads).

Outline and Preview

  • Outline lists the page's headings as an indented tree, the way a screen reader or search engine sees the page's structure. A good outline reads like a table of contents.
  • Preview shows the page. Scripts are switched off there for safety, so menus and sliders won't move, and hidden elements stay hidden.

Questions

Is this the same as the W3C validator?

It covers the mistakes that matter most in practice and explains them in plain English, and adds accessibility and search checks the validator doesn't do. For a strict, rule-by-rule check against the HTML standard, the W3C validator is still useful as a second opinion.

It complains about a WordPress or page-builder site.

Plugins and page builders often add code with problems you can't easily fix. Focus on errors in the parts you control, such as your own content and theme.

Fetch says it can't get the page.

Fetch only works for pages on the same website as the checker. Check the address, and that the page isn't behind a login. For any other site, view the page's source in the browser and paste it in.

Does it check the CSS and JavaScript too?

No, only the HTML. To find JavaScript errors, run the page in the Code Sandbox and watch the console.

Is my code sent anywhere?

No. Nothing you paste leaves this browser.