Check if all tags are closed

I have a large dynamic website that is created by PHP. I suspect that one of my components is not closing the HTML tags properly. I have HTML source code. I am wondering if there is a script or website that will tell me if all my tags are closed, etc.

+8
html
source share
3 answers

Use the W3C pegging validator service at http://validator.w3.org/

+9
source share

Try HTML Tidy. In addition, the version of the firefox plugin

If you work a lot in your browser and do not want to jump back and forth to w3 schools, this is a good choice, but, like everyone who commented on this, the validator is also good.

+1
source share

Just for fun, I have to point out that validator.nu is better at checking HTML4 than the W3C validator. Suppose your markup is this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content="Test" / <title>Test Case</title> </head> <body> <p></p> </body> </html> 

The <meta> element is clearly not closed where it should be, and as a result, the <title> element will not be recognized in browsers.

But give this markup to the W3C validator and it will tell you what it checks. This is because it is based on SGML processing, which allows the syntax to know the Null End Tag (NET) syntax, which makes you think that the / tag ends the tag.

Browsers do not support NET syntax and do not validator.nu, thereby correctly marking up the markup as in an error.

For HTML5, both validators are good.

0
source share

All Articles