[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Self-Closing Tag

Definition - What does Self-Closing Tag mean?

A self-closing tag is an element of HTML code that has evolved in the language. Typically, the self-closing tag makes use of a “/” character in order to effectively close out a beginning tag enclosed in sideways carets.

Techopedia explains Self-Closing Tag

The story of the self-closing tag has to do with the ways that HTML has been evolved throughout its use since the late 1980s. A conventional HTML tag had an opening tag and a closing tag. However, there are elements in HTML called void elements, such as images and links, that do not strictly require closing tags because of their inherent structure. Experts claim that things like images and links do not need and cannot have content – they are just kind of pointers to an element that is installed in the page.

In more recent variations of HTML such as XHTML, instead of including individual opening and closing tags, developers use a self-closing tag that includes a “/” within the carets: for example – <img src="img/circle" alt="" />

Now, with HTML 5, even that slash character is considered obsolete. W3C rules and other standards show that developers no longer need to include the character to indicate a closing tag, because it is understood that those void elements do not need any closing at all. Significant questions come up on sites around the Internet about how HTML and W3C standards deal with self-closing tag syntax.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.