
Headings are important elements of a web page, they organize text, forming its visual structure. Tags <h1> ... <h6> should only be used to highlight the headings of a new section or subsection. When using headers, their hierarchy must be taken into account, i.e. <h1> should be followed by <h2>, etc. Nesting other tags in the <h1> ... <h6> tags is also not allowed.
- Tag <h1>
The title of the highest level on the page is recommended to be used only once, if possible partially duplicating the page title. The <h1> tag must be unique for each page of the site. It is recommended to write the tag at the beginning of the article using the keyword in the title text. The font size in the browser is 2em, the upper and lower indentation is 0.67em by default.
- <h2> tag
It denotes the subheadings of the <h1> tag. The font size in the browser is 1.5em, the top and bottom margins are 0.83em by default.
- <h3> tag
Shows the subtitles of the <h2> tag. The font size in the browser is 1.17em, the upper and lower indentation is 1em by default.
- Tags <h4>, <h5>, <h6>
Subtitles of the fourth, fifth and sixth levels are designated. The font size in the browser is 1em / 0.83em / 0.67em, the default upper and lower margins are 1.33em / 1.67em / 2.33em, respectively.
Global tags are available for all tags.
Tags for formatting text
- <b> tag
Sets the bold font style. Emphasizes text without emphasis on its importance.
Global attributes are available for the tag.
- <em> tag
Displays the font in italics, giving the text meaning.
Global attributes are available for the tag.
- <i> tag
Displays the font in italics.
Global attributes are available for the tag.
- <small> tag
Decreases font size by one relative to plain text.
Global attributes are available for the tag.
- <strong> tag
Sets the font to bold, refers to logical markup tags, indicating to the browser the importance of the text.
Global attributes are available for the tag.
- <sub> tag
Used to create subscripts. Shifts the text below the line level, reducing its size.
Global attributes are available for the tag.
- <sup> tag
Used to create degrees. Shifts the text above the line level, reducing its size.
Global attributes are available for the tag.
- <ins> tag
Highlight text in a new version of a document, emphasizing it.
The following attributes are available for the tag: cite, datetime.
- <del> tag
Crosses out text. Used to highlight text deleted from a document.
The following attributes are available for the tag: cite, datetime.
- <mark> tag
It is used to highlight fragments of text for reference purposes, coloring the block of characters in yellow.
Global attributes are available for the tag.
Tags for entering "computer" text
- <code> tag
Serves to highlight fragments of program code. Displayed in a monospaced font.
Global attributes are available for the tag.
- <kbd> tag
Marks the fragment as entered by the user from the keyboard. Displayed in a monospaced font.
Global attributes are available for the tag.
- <samp> tag
It is used to highlight the result obtained during the execution of the program. Displayed in a monospaced font.
Global attributes are available for the tag.
- <var> tag
Highlight variable names in italics.
Global attributes are available for the tag.
- <pre> tag
Allows you to display text on the screen, retaining the original formatting. Spaces and line breaks are not removed.
Global attributes are available for the tag.
Tags for quotes and definitions
- <abbr> tag
Used to format abbreviations. The browser is usually underlined with a dashed line. The abbreviation is decrypted using the title attribute, it appears when you hover over the text.
Global attributes are available for the tag.
- <bdo> tag
Used to replace the current direction of the text, i.e. text in the tag is mirrored.
The dir attribute is available for the tag.
- <blockquote> tag
Highlights quotes inside a document, highlighting it with indentation and line breaks.
The cite attribute is available for the tag.
- <q> tag
Used to highlight short quotes. Browsers are enclosed in quotation marks.
The cite attribute is available for the tag.
- <cite> tag
It is used to highlight quotes, titles of works, footnotes to other documents.
Global attributes are available for the tag.
- <dfn> tag
Allows you to select text as a definition. Despite the presence of a special tag, it is recommended to highlight the text with CSS.
The title attribute is available for the tag.
Paragraphs, text wraps
- <p> tag
Breaks the text into separate paragraphs, separating each other with an empty line. The browser automatically adds an upper and lower indent equal to 1em, while the indents of adjacent paragraphs “collapse”.
Global attributes are available for the tag.
- Tag <br>
Wraps text to the next line, creating a line break.
Global attributes are available for the tag.
- <hr> tag
Used to separate content on a web page. It is displayed as a horizontal line.
Global attributes are available for the tag.
0 Comments