self closing tag
compound.compound. a piece of computer code that opens and closes itself in one step. You use it in languages like HTML for things that do not contain text, such as images or line breaks.
compound. an XML or HTML element that is opened and closed within a single tag, rather than using separate opening and closing tags. It typically represents an empty element that does not wrap around content.
An image in HTML uses a self-closing tag.
When writing modern React components, developers often use a self-closing tag if the component has no children to display.
While HTML5 allows certain elements to omit the trailing slash, strict XML parsers require a self-closing tag to be explicitly terminated to ensure the document remains well-formed.
A compound term formed from the reflexive pronoun self- and the present participle closing, applied to the existing technical sense of tag. The construction follows the syntax established in the 1986 SGML standard and the subsequent XML specification.
Etymology adapted from Wiktionary, available under CC BY-SA 4.0.
Commonly used in the context of web development and markup languages like HTML, XML, and JSX.
Last updated July 22, 2026