1.

Examples of empty element in html

Answer»

Empty tags in HTML are DOM Element Nodes that never have END tags, and more importantly, they can only have “attribute”, they can never have :
*.Element childnodes (embedded tags)*.CDATA childnodes (rawtext)
*.comment childnodesSo innerText and innerHTML DOM APIsproperties of such ELEMENTS will always be null.In XHTML notation, such tag must use the autoclose SYNTAX, ending tag are still forbidden and may lead to unexpected results from user agents, IDEs, or other tools.ex:<!— HTML syntax —>






Discussion

No Comment Found