How to set up smartphones and PCs. Informational portal

All html tags with description and examples. Basic HTML tags

A tag is a special reserved word enclosed in angle brackets (eg ). The tag is the main component of HTML: the code begins with it, it ends with it, the information displayed on the web page is contained within the tags. It is recommended to write them in lowercase, that is, in ordinary small letters: not, but.

What are tags?

Most HTML tags are paired: there is an opening tag (for example, ) and a closing tag, which is distinguished from the opening tag by a slash (/ ) after the first angle bracket (for example, ). Everything inside a pair of tags is called their content.

Content Text placed inside these tags becomes bold

There are also unpaired (single) tags, which are called labels. They, unlike pair tags, do not need to be closed, because they do not work with content, but perform some function on their own. Single tag example -
. It sets the text to wrap to the next line.

If we draw parallels with the Russian language, then we can say that paired tags are quotation marks or brackets that affect the properties of the text contained in them (try not to close the quotation marks in time), and single tags (labels) are punctuation marks (exclamation mark, question mark or dot).

Each tag consists of:

  • The opening angle bracket (< ).
  • Special word (tag name). For example, hr , iframe , b .
  • The closing angle bracket (> ).
Basic HTML tags

Since tags are the basis of the markup language, it is not surprising that there are quite a lot of them. Consider the main, most important tags.