What are all the valid self-closing elements (e.g.
) in XHTML (as implemented by the major browsers)?
I know that XHTML technically allows any element to
Better question would be: what tags can be self-closed even in HTML mode without affecting code? Answer: only those that have empty content (are void). According to HTML specs the following elements are void:
area, base, br, col, embed, hr, img, input, keygen, link, menuitem, meta, param, source, track, wbr
Older version of specification also listed command.
Besides, according to various sources the following obsolete or non-standard tags are void:
basefont, bgsound, frame, isindex