Skip to main content

Text Formatting tags in Html


Text Formatting tags:



          This section includes the tags often used for formatting the HTML text.We have many formatting tags in HTML.These are :

<font> It is used for change our text color, text size and also change the text style.

Ex:



<font face=”Liberation Serif” color=”red” size=”12”>welcome to Htmla2ztutorial</font>.

<b> tag will bold the text inside the tag.

<b>welcome to htmla2ztutorial</b>


<i>tag will italic the text inside the tag.

<i>welcome to htmla2ztutorial</i>


<u>tag will underline the text in side the tag.

<u>welcome to htmla2ztutorial</u>


<strike>tag will strike the text in side the tag.

<strike>welcome to htmla2ztutorial</strike>


<sup>tag to define superscripted text.

(a+b)<sup>2</sup>

Output:(a+b)2

<sub>tag to define subscript text.

H<sub>2</sub>O

Output: H2O


<br> tag is used to break the line .tag is an empty tag which means that it has no end tag.

Example:


<html>

<head>

<title>Text Formating tags in html</title>

</head>

<body>

<font face="Liberation Serif" size="16" color="orange">

welcome to htmla2ztutorial

</font><br>

<b>welcome to htmla2ztutorial</b><br>

<i>welcome to htmla2ztutorial</i><br>

<u>welcome to htmla2ztutorial</u><br>

<strike>welcome to htmla2ztutorial</strike><br>

(a+b)<sup>2</sup><br>

H<sub>2</sub>O

</body>

</html>


OutPut:




Comments