Incorrectly closed img tag not spotted by validator

I dont know if this is an issue or I have to turn on something...

This tag: <img src="images/quill.jpg" alt="quill" width="150" height="215"> passes the validator without any error.
I want it to be: <img src="images/quill.jpg" alt="quill" width="150" height="215" />.
The same goes to <br> tag

My doctype is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">

Any suggestions?


you can't pass validator without /> end char for non closing tags.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<img src="images/quill.jpg" alt="quill" width="150" height="215" >

try this by direct input

and you'll get an error.

btw is better for asking questions so you can get answers within minutes.


I am talking about Php storm's internal validator. It doesn't see these incorrect tags as errors.
Maybe I should raport this as a bug?


Does anybody knows if it is possible to edit HTML validation settings in Php storm?
I can't find any config file for that...


Well ... some of the Inspections (File | Settings | Inspections --> HTML) do have customisation options (e.g. "Unknown HTML tag" inspection etc). Unfortunately I cannot tell you which inspection is responsible for the <img> issue above.

In any case -- I recommend you to submit a bug report on Issue Tracker -- once created this ticket will be on their todo list for sure, even if it is not a bug but some config setting (comparing to the current situation -- so far you had no response from devs on this thread).


Please sign in to leave a comment.