Html Text Formatting

The basic formatting that can be applied to a webpage is for the text. By default, the Times Roman forn at 12 points is used. This can be changes according to our desire by using the FONT tag as shown below:

<FONT FACE="font name" SIZE="number" COLOR="color name"> Text </FONT>

FACE : allows you to specify the font name like Times Roman, Courier, Arial etc.

SIZE: allows you to give a number from 1 (size 8 points) to 7 (size 36 points).

COLOR: allows you to specify the name of the color you wish to apply to the text.

An example of the usage of the FONT tag is given below:

<FONT FACE="ARIAL" SIZE="7" COLOR="BLUE"> WELCOME</FONT>

It is advisable to close the FONT usage with the </FONT> tag. Otherwise the same style will be applied to the subsequent text as well.

Other font styles can be applied using the following tags without using the FONT tag.

Breaks

In Hml we must very clearly indicate the start of a new line or a new paragraph. If this is not done, then the sentences will continue without any break.

To specify a line break, we use the <BR> tag.

Welcome to my 'first webpage. <BR> Do you like it?

To specify a paragraph break, we use the <P> tag.

Welcome to my first webpage. <P> Do you like it?</P>

The paragraph tag must be closed with the </P> tag. When using the P tag, we can specify the alignment as shown here.

<P ALIGN="align format"> text </P>

The ALIGN option takes on the LEFT, RIGHT or CENTER values.

Headings

HTML has certain default heading styles which we can use to apply for the main heading, sub-headings etc. These headings are reffered to by the H!, H@, H#, H$, H5 and H6 tags. The H1 refers to the biggest and the H6 to the smallest.

Try the following code:

<H1> This is Heading One </H1> <BR>

<H2> This is Heading Two </H2> <BR>

<H3> This is Heading Three </H3> <BR>

<H4> This is Heading Four </H4> <BR>

<H5> This is Heading Five </H5> <BR>

<H6> This is Heading Six </H6> <BR>