HTML tags are the basis HTML language. Tags are used to delimit the beginning and end of elements in markup.

Each HTML document consists of a tree of HTML elements and text. Each HTML element is identified by a start (opening) and ending (closing) tag. The opening and closing tags contain the name of the tag.

All HTML elements are divided into five types:

  • empty elements - , ,
    , , , , , ,
    Used for storage additional information about the page. Browsers use this information to process the page, and search engines- for its indexing. There can be several tags in a block, since depending on the attributes used they carry different information. Indicator of measurement in a given range. A section of a document containing navigation links for the site. Defines a section that does not support scripting. Container for embedding multimedia (e.g. audio, video, Java applets, ActiveX, PDF and Flash). You can also insert another web page into the current HTML document. The tag is used to pass the parameters of the plugin. Ordered numbered list. Numbering can be numeric or alphabetical. A container with a title for a group of elements. Specifies an option/option to select from the , or , drop-down list. Field for displaying the result of a calculation calculated using the script.

    Paragraphs in the text. Defines parameters for plugins embedded using the element. A container element containing one element and zero or more elements. By itself it does not display anything. Allows the browser to select the most appropriate image. Outputs text without formatting, preserving spaces and text breaks. Can be used to display computer code, messages email etc. An indicator of the completion of a task of any kind. Defines a short quotation. Container for East Asian symbols and their decoding. Defines its nested text as the base component of the annotation. Adds brief description above or below the characters contained in the element, displayed in a smaller font. Marks embedded text as additional annotation. Displays alternative text if the browser does not support the element. Displays text that is not current with a strikethrough. Used to display text representing the result of execution program code or script, as well as system messages. Displayed in monospace font. Used to define a client-side script (usually JavaScript). Contains either script text or points to external file script using the src attribute. Defines a logical area (section) of a page, usually with a header. A control element that allows you to select values ​​from a proposed set. Variant values ​​are placed in . Displays text in a smaller font size. Specifies the location and type of alternative media resources for the , , . Container for inline elements. Can be used to format passages of text, such as highlighting individual words. Places emphasis in the text, highlighting it in bold. Includes embeddable style sheets. Specifies subscript writing of symbols, for example, element index in chemical formulas. Creates a visible title for the tag. Displayed with a filled triangle, clicking on it allows you to view the title details. Specifies the superscript spelling of characters.

    Cheat sheet with tags

    For ease of use, I grouped the tags into thematic sections, adding display property values ​​for each tag. To go to the table, click on the picture.

    Special HTML characters are short pieces of code called symbolic entities. They are used to display characters that have special meaning in HTML, as well as characters that are not available on the keyboard.

    Special characters in HTML are called reserved characters. For example, left () angle brackets are reserved in HTML to define opening and closing tags.

    Symbols that are not available on the keyboard include characters such as the copyright symbol (©) and the mathematical value pi.

    If we want to use them in a document and display them in the browser, we need to use HTML character references.

    Case Study

    Let's say you want to display a block of HTML code on a web page and display element tags. You can do this by simply placing an HTML block within . But you will find that even in , the block will still be treated as HTML code and rendered accordingly by the browser. In this case, you can replace all HTML special characters with corresponding symbolic links to prevent the browser from parsing the code:

    This is a list of items.

    • List Item A
    • List Item B
    • List Item C

    Tag for creating a table.
    Defines the body of the table.
    Creates a table cell.
    Used to declare HTML code fragments that can be cloned and inserted into a document by a script. The content of a tag is not a child of it.
    Creates large text input fields.
    Defines the table footer.
    Creates a table cell title.
    Defines the table title.
    Defines date/time.
    The title of an HTML document that appears at the top of the browser's title bar. May also appear in search results, so this should be taken into account when providing a title.
    Creates a table row.
    Adds subtitles for elements and .
    Highlights a passage of text by underlining, without additional emphasis.
    Creates a bulleted list.
    Highlights variables from programs by displaying them in italics.
    Adds video files to the page. Supports 3 video formats: MP4, WebM, Ogg.
    Indicates to the browser where a long line might break.