HTML Text Formating - SwatiMaurya08/html-notes GitHub Wiki
Anything that appears within <b>
...</b>
element, is displayed in bold.
Anything that appears within <i>
...</i>
element is displayed in italicized.
Anything that appears within <u>
...</u>
element, is displayed with underline.
Anything that appears within <strike>
...</strike>
element is displayed with strikethrough, which is a thin line through the text.
The content of a <tt>
...</tt>
element is written in monospaced font. Most of the fonts are known as variable-width fonts because different letters are of different widths (for example, the letter 'm' is wider than the letter 'i'). In a monospaced font, however, each letter has the same width.
The content of a <sup>
...</sup>
element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character's height above the other characters.
The content of a <sub>
...</sub>
element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character's height beneath the other characters.
Anything that appears within <ins>
...</ins>
element is displayed as inserted text.
Anything that appears within <del>
...</del>
element, is displayed as deleted text.
The content of the <big>
...</big>
element is displayed one font size larger than the rest of the text surrounding it.
The content of the <small>
...</small>
element is displayed one font size smaller than the rest of the text surrounding it.
The <div>
and <span>
elements allow you to group together several elements to create sections or subsections of a page.
For example, you might want to put all of the footnotes on a page within a <div>
element to indicate that all of the elements within that <div>
element relate to the footnotes. You might then attach a style to this <div>
element so that they appear using a special set of style rules.
The <span>
element, on the other hand, can be used to group inline elements only. So, if you have a part of a sentence or paragraph which you want to group together.