I have a large dynamic website that is being constructed by PHP. I suspect that one of my components are not closing the HTML tags properly. I have the source output HTML. I am wondering if there is a script, or website, that will tell me if all my tags are closed and such?
Examples are images and line breaks. XHTML is more strict than HTML, and requires that all open tags must be closed, even if they're not container tags. Therefore, non-container tags end in />. For example, the tag for a line break is <br />.
No, not all the tags are ending tags. Tags may be either paired or unpaired (or single). Paired tags need to be closed, i.e. they contains both ending and non-ending tags, whereas unpaired tags need not be closed, i.e. they only contain opening tags.
↑ The full list of valid self-closing tags in HTML5 is: area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, and wbr.
If you save your HTML as page. xhtml (instead of page. html ), the browser (Firefox/Chrome or Opera) should find the un-closed tags for you without the need for a validator. Just remember to rename them .
Use the W3C Markup Validator Service at http://validator.w3.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With