HTML Font tag is used to change the text size, text color and font of the text. The table below lists the font attributes:
Attribute | Description |
---|---|
Face | To change font of the text. |
Size | To change text size. Size value must be between 1 and 7. Default font size is 3. |
Color | To change text color. |
<font color="red"> Text with Red color </font> <font size="5"> Text with font size 5 </font> <font face="Lucida Handwriting"> Text with font face "Lucida Handwriting". </font> <font color="red" size="5" face="Lucida Handwriting">Text Size='5' Color='red' face='Lucida Handwriting'. </font>
Attribute | Description |
---|---|
<br> | Break row: anything following it starts from the new line. |
<b> ... </b> <strong>...</strong> | To Make Text Bold |
<i> ... </i> <em> ... </em> | To Make Text Italic |
<u> ... </u> <ins> ... </ins> | To Make Text Underline |
<sup> ... </sup> | To create text as Superscript, X2 |
<sub> ... </sub> | To create text as Subscript, H2O |
<strike> ... </strike> <s> ... </s> <del> ... </del> | To |
<small> ... </small> | <small> tag makes the font size one point smaller, i.e. 2. Default Font size is 3. |
<big> ... </big> | <big> tag makes the font size one point larger, i.e. 4. |
<center>...</center> | To Make the Text alignment center. |
| Stands for Non-Breaking Space, use to spacing between the text. |
<q> ... </q> | Use for Quotationmark. |
<blockquote>...</blockquote> | Use for indent the text (left, right margin) |
<tt> ... </tt> | We know that most of the fonts are known as variable-width fonts because different letters have different width. (for example: 'w' is wider than 'i'). Monospaced(<tt>) Font provides similar space among every letter. |
<bdo>...</bdo> | Bi-Directional override, use to override the current text direction. Syntax: <bdo dir="rtl"> This text will go right to left.</bdo> |