HTML
Following are the most common formatting used in HTML.
To make a text bold we use the <b>
tag.
<p>This text is in <b>bold</b> format.</p>
Output
This text is in bold format.
To make a text italic we use the <i>
tag.
<p>This text is in <i>italic</i> format.</p>
Output
This text is in italic format.
To make a text underline we use the <u>
tag.
<p>This text is in <u>underline</u> format.</p>
Output
This text is in underline format.
To make a text subscript we use the <sub>
tag.
<p>This text is in <sub>subscript</sub> format.</p>
Output
This text is in subscript format.
To make a text superscript we use the <sup>
tag.
<p>This text is in <sup>superscript</sup> format.</p>
Output
This text is in superscript format.
To denote address we use the <address>
tag.
<address>
#123 HSR Sector 2, 37th Main road, Random Address, Bangalore
Pincode 560001 India
</address>
Output
#123 HSR Sector 2, 37th Main road, Random Address, Bangalore Pincode 560001 IndiaTo make a text strikethrough we use the <strike>
tag.
<p>This text is in <strike>strikethrough</strike> format.</p>
Output
This text is in strikethrough format.
To make a text deleted we use the <del>
tag.
<p>This text is in <del>deleted</del> format.</p>
Output
This text is in deleted format.
To make a text inserted we use the <ins>
tag.
<p>This text is in <ins>inserted</ins> format.</p>
Output
This text is in inserted format.
To make a text smaller we use the <small>
tag.
<p>This text is in <small>small</small> format.</p>
Output
This text is in small format.
To make a text bigger we use the <big>
tag.
<p>This text is in <big>big</big> format.</p>
Output
This text is in big format.
To mark text we use the <mark>
tag.
<p>This text is in <mark>mark</mark> format.</p>
Output
This text is in mark format.
To emphasized text we use the <em>
tag.
<p>This text is in <em>emphasized</em> format.</p>
Output
This text is in emphasized format.
To make a strong (important) text we use the <strong>
tag.
<p>This text is in <strong>strong</strong> format.</p>
Output
This text is in strong format.
To create abbreviation of a text we use the <abbr>
tag.
<p>We are learning <abbr title="Hyper Text Markup Language">HTML</abbr>.</p>
Output
We are learning HTML.
To denote acronym we use the <acronym>
tag.
<p>Indian Space Research Organisation or <acronym>ISRO</acronym></p>
Output
Indian Space Research Organisation or ISRO
To denote quote we use the <blockquote>
tag.
<p><blockquote>I hated every minute of training, but I said, &aposDon&apost quit. Suffer now and live the rest of your life as a champion.&apos
- Muhammad Ali</blockquote>
</p>
Output
I hated every minute of training, but I said, 'Don't quit. Suffer now and live the rest of your life as a champion.'
- Muhammad Ali
To denote code we use the <code>
tag.
<code><?php echo "Hello World!" ?></code>
Output
<?php echo "Hello World!" ?>
To denote variable of a program we use the <var>
tag.
int <var>age</var> = 10;
Output
int age = 10;
To denote code output we use the <samp>
tag.
<samp>Hello World!</samp>
Output
Hello World!To denote keyboard input we use the <kbd>
tag.
<p>Type the <kbd>i</kbd> key to enter INSERT MODE in vi using terminal.</p>
Output
Type the i key to enter INSERT MODE in vi using terminal.
ADVERTISEMENT