<b>
cap (a poem)<strong>
: Both are used for bold text, but<strong>
Semantically more emphasis is placed on the importance of the text, and the<b>
Bolding in style only.<i>
cap (a poem)<em>
:<i>
Used to represent italicized text, but mainly a stylistic change;<em>
Instead, it is used to indicate emphasized text that has semantic importance.<small>
cap (a poem)<big>
:<small>
for displaying small print.<big>
Used for displaying large print, but please note that the<big>
tag has been deprecated in HTML5 and it is recommended to use CSS to control the font size.<sub>
cap (a poem)<sup>
: Used to represent subscripted and superscripted text, respectively, and commonly used in scenarios such as mathematical formulas, chemical formulas, or footnotes.<ins>
cap (a poem)<del>
:<ins>
for marking the inserted text.<del>
Used to mark deleted text, both are semantically important and browsers may display them differently (e.g., strikethrough indicates deletion).<s>
cap (a poem)<strike>
: Both of these tags are used to indicate text that is no longer accurate or relevant, but they have been deprecated in HTML5 in favor of the<del>
substitute (X for Y, or a number in an algebraic expression)<s>
cap (a poem)<strike>
。<u>
: Underline text, but only for non-text style underlining, such as spelling errors, and not for decorative purposes. In HTML5, CSS is preferred for underlining. In HTML5, it is preferred to use CSS for underlining text, which is usually displayed in an equal-width font to distinguish it from regular text.<kbd>
: Indicates user input, usually keyboard input, and will be displayed in a style similar to the keys on a keyboard.<samp>
: Indicates example output, such as the output of a program, which is also usually displayed in an equal-width font.<tt>
: Defines typewriter code, but is no longer recommended in HTML5 as it simply changes the font style of the text with no semantic meaning.<var>
: Indicates a variable name, often used in mathematical expressions or programming documentation.<pre>
: Preformatted text, a text format that preserves whitespace (spaces, tabs, line breaks), usually used to display code or preformatted text data.