Basic HTML Tags
HTML Lesson 1.1. The Structure and History of HTML
Structural elements of language
- The unit of the HTML language is a tag – a command enclosed in angle brackets.
- Tags can be opening (starting the command action) or closing (stopping the command action).
- The closing tag is distinguished by the presence of a forward slash
/. - Tag commands apply to their contents :

- The entire opening-closing tag pair is called an element or container.
- In addition to elements that contain both an opening and a closing tag, there are empty elements, which appear to have no content and, therefore, no closing tag. However, their content is actually the opening tag itself.
Example of empty elements:
<img/>
<br/>
Example of an HTML document with explanations:

Another example of an HTML page:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | < html > < head > ...Service information... < / head > < body > < h1 > My First HTML Document < / h1 > < hr > <!-- horizontal line --> < p > Some text. The main content of the current page. The first paragraph < p > The second paragraph. Different formatting methods are used to format the text. HTML language elements. < / p > <!–- paragraph --> < / body > < / html > |
In HTML, comments are placed using symbols.
<!-- content of inline comment--> <!-- content of block comment -->Such a comment can be either inline, i.e. occupying one line of the document, or block-type, occupying several lines.
head(i.e., after the opening tag head – the head of the document)Eleme

nts can be nested, so it looks something like this:
< p > This is < em > very < / em > interesting < / p > |
Schematically, parent tags and nested (child) tags look like this:

Block and inline elements
All HTML elements are divided into inline and block elements. Inline elements are distinguished by their ability to allow subsequent elements to be placed on their own line (they allow them to “stand” next to each other).
Whereas block elements will occupy the entire line, preventing subsequent elements from being able to access it. This is what it looks like:
