Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a name for a tag that closes itself?

Tags:

html

xml

tags

In a tag based language like HTML or XML, there are tags which close themselves without the use of a second tag:

<tag/>

Rather than this:

<tag></tag>

Is there a specific name for tags that close themselves?

Thanks! :)

like image 221
Lemmings19 Avatar asked Jul 09 '12 20:07

Lemmings19


1 Answers

The XML specification refers to them as empty-element tags.

Source:

Definition: An element with no content is said to be empty.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. [Definition: An empty-element tag takes a special form:]

like image 181
Wayne Avatar answered Oct 20 '22 04:10

Wayne