Formatting a text
For text formatting there are some special tags.
For bold a text
We can use <B>--</B> or <STRONG>--</STRONG>
Here <B> stands for “bold”
For italic a text
We can use <I>--</I> or <EM>--</EM> or <DFN>--</DFN>
Here <I> Stands for “italic”, <EM> stands for “emphasis” and <DFN> stands for “definition”
For superscript a text
We Can use <SUP>--</SUP> for super scripting.
<SUP> stands for “superscript”
For subscript a text
We Can use <SUB>--</SUB> for sub scripting.
<SUB> stands for “subscript”
For delete a text
We Can use <DEL>--</DEL> for delete a text with a single strike.
<DEL> stands for “delete”
For block quote a text
We Can use <BLOCKQUOTE>--</BLOCKQUOTE> for indent a text from left margin to right.
For highlight a text
We Can use <MARK>--</MARK> for highlight a text.
For underline a text
We Can use <U>--</U> for underline a text.
<U> stands for “underline”
To use addresses
We Can use <ADDRESS>--</ADDRESS>
Example:
<HTML>
<HEAD><TITLE>Text Formatting</TITLE></HEAD>
<BODY>
<B>This is bold tag</B><BR>
<I>This is italic tag</I><BR>
<EM>This tag is also use to italic a text</EM><BR>
<DFN>Definition tag normally in italic </DFN><BR>
I'm the 1<SUP>st</SUP>
<P>Water is known as H<SUB>2</SUB>o.</P>
<P>This is my <DEL>first</DEL> HTML document</P>
<BLOCKQUOTE>This text is away from left margin</BLOCKQUOTE>
<MARK> I want to highlight this sentence</MARK><BR>
<U>IS this underlined.</U>
<P>contact us @<ADDRESS>Main Road,Red light district.</ADDRESS></p>
</BODY>
</HTML>
Save this as “text formatting.html”.
Open it through your web browser.