Text Formatting Tags in HTML
HTML provides following tags to work with text in html documents.
<font> tag:
By using this tag,we can able to change the size and color of the text.
format :
text
<b> tag:
It bolds the text. i.e it is used to display the written text in bold format.
format :
some text
<strong> tag :
It bolds the text and it is an advanced version of <b> tag.
format :
some text
- <u> tag:
It underlines the text.
format :
some text
<ins> tag:
It underlines the text and it is an advanced version of <u> tag
format :
some text
<i> tag:
It italics the text
format :
some text
<em> tag:
It italics the text and it is an advanced version of <i> tag.
format :
some text
<s> tag :
It strikes the text.
format :
some text
<del> tag :
It strikes the text and it is an advanced version of <s> tag.
format :
some text
<mark> tag :
It used to highlight a text in HTML.
format :
some text
Example 1: "
text.html"
Text
Formatting Text
font size -7 : HTML
font size-3 : HTML
font color-"red" : HTML
font size-6 and color -red : HTML
bold,underline and italic : Text
Bold :HTML
Strong :HTML
Underline :HTML
Ins :HTML
Italic :HTML
Emapasis :HTML
Strike :HTML
Del :HTML
Highlighting a text :HTML
Output:
<sub> tag :
It sub scripts the text. Ex: H2O
format :
H2O
<sup> tag :
It super scripts the text. Ex: a2
format :
a2
Example 2: "
subsup.html"
Formula for Water : H2O
Basic Mathematical Formula
(a+b)2=a2+b2+2*a*b
Output:
Character Escape Sequences :
Escapes sequences could be wrongfully interpreted as markup in HTML.so the following characters are reserved in HTML and must be replaced with their corresponding HTML entities:
- " is replaced with "& quot;"
- & is replaced with "& amp;"
- < is replaced with "& lt;"
- > is replaced with "& gt;"
- space is replaced with "& nbsp;"
Next Topic :Anchor Tag in HTML