HTML validation: catch missing closing tag

How much overkill is using WebStorm to develop responsive email?! Well, I do it anyway because WebStorm is such a fine tool.

I know I risk sounding like a comlete idiot, but I'm going to ask anyway. In the past, it seems like WebStorm would alert me if I messed up and removed a closing tag. But yesterday I discovered I'd left a <p> unclosed, but I received no warning. How come?

When I checked out the available inspections, empty tags were included...but not unclosed ones. Am I missing something, or has this always been true? Is there anything I can do in order to have WebStorm watch out for this?

Thanks in advance....


Hi there,

1) Please provide whole file.
2) If this file is only partial (has no doctype) then what default schema/HTML language level you have in Settings/Preferences: HTML v4 or 5 or ...?

In any case: in HTML 5 it's not required to have <p> tags closed.

You can always try "File | Invalidate caches..." and restart IDE (although from your description this should not make any difference here as usually it helps when IDE marks valid tags/code as errors)


Thanks very much for your reply, Andriy!

I'm working on the email for a client and, unfortunately, can't legally share it. I realize that may limit your ability to assist here and I'm sorry. But I can certainly tell you I'm using the XHTML transitional doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

After tinkering around a bit, I found the problem: my file was a .html one. Once I changed it to .xhtml, that unclosed tag got caught right away. This article was particularly helpful, and I include it here for others who may find themselves in this situation.

All this time, I assumed one could use the XHTML doctype in an HTML document. I was obviously mistaken. Well, it would appear that you CAN, but it doesn't actually DO anything. Sounds like this is a common misconception. Live and learn: guess I got schooled today. :)

Again, thanks very much. You got me heading down the right path.



Please sign in to leave a comment.