Text formatting tags in HTML

HTML Formatting tags :

There are several tags in HTML used to format the text, like , <strong>, <em>,etc. These formatting tags can make text bold, italic, sub/superscripted and more.

<strong> tag :

It causes anything between <strong> & </strong> to be rendered in boldfaces.

<em> tag :

It defines anything between <em> & </em> to displayed in Italic.

<u> tag :

This tag underlines the text appearing in between this tag.

<s> tag :

It puts line through the text containing inside the <s> tag & its </s> tag.

<address> tag :

This tag defines information about web page such as URL(Uniform Resource Locator), date of last version, adress, etc. It provides contact information for the author and enables readers to contact the author.

<pre> tag :

The text appearing in between <pre> & </pre> displayed in exactly same format as typed in. It also preserves
line breaks and      blank spaces.
align :Sets align of the inner content.left, right, center, justify
width :It defines number of characters per line.number

<big> tag :

This tag displays text one font size larger than surrounding text.

<small> tag :

This tag displays text one font size smaller.

<sub> tag :

This tag displays text half a character size lower. Like here,
H<sub>2</sub>O, CO<sub>2</sub>, O<sub>2</sub>, So<sub>2</sub>

Output :

H2O, CO2, O2, SO2

<sup> tag :

This tag displays text half a character size height higher. Eg.
(x+y)<sup>2</sup>, (5888)<sup>3</sup>

Output :

(x+y)2, (5888)3

<tt> tag :

This tag displays text in monospaced form.

<font> tag :

This tag changes texts size,style & color.
This tag have following attributes:
size : Defines size of text. number
face : Sets the fonts style. font_family
color : Sets color for enclosed text. rgb(x,x,x), #xxxxxx or colorname
lang : Language for a text to be appear in can be set here. language_code

<marquee> tag :

This tag causes text to be scroll across the browser.
This tag doesn't work in all browsers. Eg.
<marquee align="top" bgcolor="blue" behavior="alternate" width="50%" height="30px" direction="right" scrollamount="10" scrolldelay="1000" >This text will bounce from left to right</marquee>

Output :

This text will bounce from left to right.
It has following attributes:
align : Sets the alignment of the text to be scroll over the marquee.left, right, top, bottom or middle.
bgcolor : Sets the background color of the marquee.rgb(x,x,x), #xxxxxx or colorname
height : Sets the height of the marquee area.pixels or %
width : Sets the width of the marquee area.pixels or %
direction : Sets the direction from where the text will start scrolling.left, right, up or down.
scrollamount : How many pixels the text should moves between 'frames' is set here.pixels
scrolldelay : Smoothness of scrolling can be achieve by setting this attribute. This sets the amount of time, in milliseconds, between 'frames'.milliseconds

You Might Also Like


Follow by Email

My photo
Hi. I am Ramesh Wetkoli. Three things I try to include in my blog posts are creativity, useful insights, and trendy information. I.T. graduate and working professional. I have leveraged 6+ years of work experience in I.T. industry and learnt various technologies, providing merchandizing support and handling digital marketing responsibilities.

Popular Posts

Find us on Facebook