|unnecessary <li> closing tag required [message #781113]
||Fri, 20 January 2012 15:18
| Julien Robinson
Registered: January 2012
I've looked through the web and these forums but not found anything about this particular (minor) issue.
I have a project with PHP and HTML. Whenever I use an HTML list with <li> items, I get warnings "invalid location of tag (li)". These appear to be provoked by the missing closing tag </li>. However, closing tags are not mandatory for <li> per the HTML 4 spec.
Question 1: how can I tell the validator about <li> and other tags that don't need to be closed ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/ /www.w3.org/TR/html4/strict.dtd"><!-- remove the space in the link! -->
some (indirect) documentation about closing tags here: http:/ /stackoverflow.com/questions/3008593 (remove the space in the link)
(great read, BTW)
I'd better say, because otherwise I might get this answer: I do not think it's a good idea to disable warnings, such as "invalid location of tag" (I know how to do that), or to introduce exceptions for the specific files (I also know how to do that). Warnings may be useful in another context, one never knows.
Another remark: I've tried it with and without the first line "<!DOCTYPE...", the results are the same.
Yet another remark: what's strange is that if I add </li> and save, the warnings disappear; then I remove the </li>, the warnings still don't come back!! But if afterwards I rebuild the project... the warnings are back!
Question 2: could it be a matter of refreshing the project properties, or removing an XML validator that perhaps is taking precedence?
Oh, and of course, my working versions:
Version: Helios Release
Build id: 20100617-1415
with plug-in "SVN team provider" added.
Thanks for any tips!
PS : spaces in links because I don't have the rights to post links
Powered by FUDForum
. Page generated in 0.01748 seconds