What are HTML Tags?

What do you mean by HTML tags?

HTML tags are also known as HTML elements, and their respective attributes are used to create HTML documents so that you can view them in browsers and other user agents.

HTML TAGS

Tags are instructions that are embedded directly into the text of the document. An HTML tag is a signal to a browser that it should do something other than just throwing the text up on the screen. By convention all HTML tags begin with an opening angle bracket (<) and ends with a closing angle bracket (>).

HTML tags can be divided into two types:

PAIRED TAGS-

A tag is said to be a paired tag if it, along with a companion tag, flanks the text. For example, the <B> tag is a paired tag. The <B> tag with its companion tag </B> causes the text contained between them to be rendered in BOLD. The effect of other paired tags is applied only to the text they contain.

In paired tags, the first tag (<B>) is often called the OPENING TAG and the second tag (</B>) is called the CLOSING TAG.

The opening tag activates the effect and the closing tag turns the effect off.

SINGULAR OR STAND-ALONE TAGS

The second type of tag is the Singular or Stand-Alone tag. A stand-alone tag does not have a companion tag. For example, <BR> tag will insert a line break. This tag does not require any companion tag.

Toggle Sidebar