What are all the valid self-closing elements in XHTML (as implemented by the major browsers)?

前端 未结 13 1841
夕颜
夕颜 2020-11-22 05:16

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

13条回答
  •  我寻月下人不归
    2020-11-22 05:56

    The self-closing syntax works on all elements in application/xhtml+xml. It isn’t supported on any element in text/html, but the elements that are “empty” in HTML4 or “void” in HTML5 don’t take an end tag anyway, so if you put a slash on those it appears as though the self-closing syntax were supported.

提交回复
热议问题