views:

420

answers:

4

Can Google Chrome show HTML errors (e.g. unclosed tags)? If so, how does one do it?

Thanks

A: 

Top right of Chrome

> Paper Icon > Developer > Developer tools

or use

CTRL + SHIFT + i

keyboard shortcut

View Developer tools console for errors

Yada
That doesn't really answer his question. That will show you the source, but not validate it.
Josh
Should I add "View console for error"?
Yada
Developer tools do not seem to show HTML errors.
Brian M. Hunt
A: 

I'm not sure it can do exactly what you're after without an extension. You can use the developer tools to explore the HTML to see if it is what you expect/intend, but I don't think it will tell you where there are errors.

HTML browsers are designed to be able to taken invalid markup and render it as best they can. It will have a very high tolerance for errors.

You may want to try an extension like one of these.

Josh
+1  A: 

Use HTML Validator extension.

https://chrome.google.com/extensions/detail/cgndfbhngibokieehnjhbjkkhbfmhojo

uthark
+2  A: 

The built-in "Developer Tools" can show HTML errors itself. In the bottom right corner of the Developer Tools window, there's a tiny red circle with an X in it and the number of errors on the page.

Also, you can just click the "show console." button and above the prompt, the errors are printed.

A third way inside Developer Tools is to go to Resources, Enable Instrumentation, and next to any request with errors is a red circle with a number inside. That number is the number of errors. If you scroll around inside the preview window on the right side, there are big shiny red bubbles with descriptions of each of the errors.

Scott Stafford