Computer Science, asked by harishdewa71pbrfjh, 1 year ago

examples of empty element in html

Answers

Answered by Tajeshsahu
1
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 —><hr><!-- XHTML syntax --><hr/><!-- forbidden syntax --><hr></hr>
Answered by Anonymous
1

Answer:

Empty Elements only has a single tag that performs a general operation. They do not work on blocks of texts.

Examples of Empty Tags are <br>, &nbsp, etc.

Similar questions