Sublime Forum

HTML self closing tags

#1

I’m enjoying Sublimes ability to input any tag by typing the name and pressing Tab. But I have 2 minor issues with it (which I have been able to change via preferences and snippet files, but figured it’s worth mentioning).

In self closing tags, sublime outputs the html 4 method () and not the xhtml method ( maybe html5 as well). Which is no big deal really, I changed the snippet file for that, and I wondered if it’s a common enough idea for that to be the default in the system. As well as that issue, it seems that the button tag is inside the self closing elements list (under HTML preferences). But I think that button is always a standard tag (My button content here) as buttons can also contain img tags etc.

I just checked the w3c validator on the button issue, XHTML1.0 seems to fine with it self closing, but HTML4 is not. Having it act as a non-self-closing tag is valid in both doctypes. So I figure it’s better to make it valid in both, rather than just 1?

Only minor issues as I said. Otherwise no complaints :smile:

0 Likes