Home Download Buy Blog Forum Support

HTML self closing tags

HTML self closing tags

Postby de.monkeyz on Thu Oct 14, 2010 5:39 pm

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 (<tag>) and not the xhtml method (<tag /> 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 (<button>My button content here</button>) 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 :)
de.monkeyz
 
Posts: 4
Joined: Thu Sep 23, 2010 10:27 am

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: _Jo_ and 9 guests