Free tool · HTML tester and previewer
Free online HTML tester
Preview your HTML at desktop, tablet and phone widths, and get a short list of what to fix before anyone else sees it.
- ✓ ok Doctype Starts with <!doctype html>, so browsers use standards mode.
- ✓ ok Title “Product one-pager”
- warn Viewport meta No <meta name="viewport">. Phones will show a shrunken desktop layout.
- ✓ ok Tags Every element that needs a closing tag has one, in order.
- warn Image alt text 1 image without an alt attribute. Screen readers cannot describe it.
- ✓ ok Console errors No errors logged while the preview ran.
Published free with no signup, the page is live for 7 days; sign up free to keep it. A published page is public to anyone with the link and noindex.
What it checks
Six checks for the problems that actually break pages
Doctype
Without <!doctype html> at the top, browsers switch to quirks mode, and sizes, margins and tables can come out different from what you designed.
Title
The <title> names the browser tab and the preview card when the link is shared in a chat. A missing one shows the bare address.
Viewport meta
Without <meta name="viewport">, phones draw the page at desktop width and shrink it, so text is tiny. Check it with the Mobile width.
Unclosed and mismatched tags
A missing </div> or </a> lets one element swallow the next, so a footer can end up inside a column. Close tags HTML lets you skip, such as </p> and </li>, are not counted.
Images without alt
Screen readers say nothing useful for an image without alt text. Decorative images should still have alt="".
Console errors
Script errors and rejected promises raised while the preview runs, with their line number. A page can look right and still have a broken button.
Related tools
After the test
HTML to website
Passed the checks? Put it online as a website with its own address.
HTML to website →HTML tester FAQ
Paste it into the editor above, or drop the .html file on it. The preview renders it, and the Checks panel under the preview lists anything to fix, with line numbers for tag problems. Switch between Desktop, Tablet and Mobile to see the layout at each width. The checks update as you edit, so you can fix and watch the list shrink.
A validator, such as the W3C one, checks your markup against every rule in the HTML standard and reports each one. This tester checks the few problems that most often break a page in practice, and it also runs the page, so it catches script errors that a validator never sees. Use both when the page matters.
Browsers repair broken HTML instead of refusing it: they close elements where the standard says to. The repair is not always what you meant. An unclosed <div> can pull everything after it into the wrong box, and one browser may place it differently from another. The tag check points at the line so you can close it yourself.
Use the Mobile width (390 pixels) or Tablet (768 pixels) above the preview for a quick look. To check on the real device, press Get a link and open the link on your phone. A link published without an account stays live for 7 days; claim it free to keep it as one of your 2 free pages.