DEV Community

Discussion on: Should I "close" <img > and other HTML tags?

Collapse
 
tbroyer profile image
Thomas Broyer • Edited

I was about to point you to hixie.ch/advocacy/xhtml as a rebuttal to your proposal to "close" void tags, but it looks like it actually (kind of) agrees with you on that point.

Just make sure the people you work with don't mistake HTML5 for XML and then produce <script src="…" /> or CDATA sections, and at the same time also stick to your rule of being XML-compatible (which also means always quoting attributes, never omitting optional tags, etc.)

At work, I ask coworkers to not use />, we're doing HTML, not XML, and the clearer you make the better IMO.