All Empty Tags in HTML
For my next book, I need a complete list of all the empty tags possible in classic HTML such as <br>, <img>, and <hr>. This is a list of the genuinely empty elements, not including the ones with omitted end-tags such as <p> and <li>.
So far here are the ones I’ve got. Am I missing any?
<br><hr><meta><link><base><link><meta><hr><br><img><embed><param><area><col><input>
January 29th, 2007 at 4:12 PM
You’re missing FRAME from HTML 4, ISINDEX and NEXTID from HTML 2, and BASEFONT, BGSOUND, KEYGEN, SOUND, SPACER and WBR from various proprietary extensions.
January 31st, 2007 at 10:59 PM
I guess this depends on the definition of “classic” html. I don’t think that has been part of the standard html.
January 31st, 2007 at 11:04 PM
Guess I should have stripped the arrows from the tag.
What I was trying to way:
I guess this depends on the definition of “classic” html. I don’t think that the embed tag has been part of the standard html.
February 9th, 2007 at 2:59 PM
[…] With a little luck, the book should be on store shelves sometime this summer. I’ve already posted a number of questions that arose while writing it. I’m going to be posting a lot more over the next couple of months. I also plan to post many small excerpts from the book for your perusal and comment. I hope you’ll help out by commenting on, caviling, and correcting the draft pieces I’ll be posting here. […]
January 12th, 2008 at 4:55 PM
I’ve had to come up with a list of the same thing. Here’s mine, copied out of the Lua library I’m working on:
— Defined in HTML 4.01:
“area”, “base”, “basefont”, “br”, “col”, “frame”, “hr”,
“img”, “input”, “isindex”, “link”, “meta”, “param”,
— Defined (but deprecated) in HTML 2.0 (RFC 1866):
“nextid”,
— Proprietary extensions:
“bgsound”, “embed”, “keygen”, “spacer”, “wbr”
January 12th, 2012 at 7:39 AM
Just stumbledupon this and it’s a great list.
Would this be broadened to include & nbsp and other similar elements?
February 11th, 2012 at 6:16 AM
Please kindly note down…. is not an EMPTY ELEMNT….its a CONTAINER ELEMENT!!!!
The thing is that its just optional….and this question is generally asked in COMPETITIVE EXAMS….!