What Is an “empty Tag”?

Jan Kaláb/CC-BY-SA 2.0

An “empty tag” refers to HTML coding where the line of code stands alone and is not closed with slash characters. Empty tags are used to insert images, lists, breaks, meta tags, horizontal rules and hyperlinks. Empty tags are bracketed by “<" and ">” characters. Empty tags do not have any outside content from other programs, and they only contain a single code to place something on a Web page.

A meta tag tells the Internet browser what characters to display on the screen. The code to insert an image uses an empty tag that simply puts the image, rather than text, on the screen. A list is organized text that has one line after another. Line breaks insert a blank line between paragraphs of text, while a horizontal rule puts a line through text as if it has been crossed through with an editing mark. A hyperlink is a link to another Web page.

Another kind of HTML tag is a container tag. Container tags differ from empty tags in that they import coding from another source, and the container tag ends with a slash or “/” character. HTML uses empty tags, but XHTML and other similar languages do not. If a person forgets to close a command in XHTML, the code command does not finish properly.