HTML Format

Started by VelMurugan, Apr 30, 2009, 03:32 PM

Previous topic - Next topic

VelMurugan

HTML Format

This section includes the tags often used for formatting the HTML text.

<font>

The <font> tag is used to change the format of the text on the web page. The most important attributes are as follows:

    * face: The type of font. Common ones include "Time New Roman", "Verdana", and "Helvetica."
    * size: This indicates the size of the text. This can be absolute (0 .. 6), or relative ("+1", "+2", ... or "-1", "-2" ...)
    * color: This indicates the color of the text. Either the color name or the six-character color code may be used to specify color.

Below are some examples:

Example 1

HTML:
<font size=2 face="impact" color=red>This illustrates the attributes of the font tag.</font>

Display:
This illustrates the attributes of the font tag.

Example 2

HTML:
<font size="+1" face="Verdana" color=AA5088>This illustrates the attributes of the font tag.</font>

Display:
This illustrates the attributes of the font tag.

>

The tag will bold the text inside the tag.

>

The tag will italicize the text inside the tag.

>

The tag will underline the text inside the tag.

Here's an example using , , and :

>Example 3

HTML:
This example shows how important it is to use tags.

Display:
This example shows how important it is to use tags.

Header Tags


The header tags <h1>, ... <h6> allows us to place additional importance on the text within such tags. <h1> has the largest size, and <h6> the smallest. Many search engines
put additional weight on the texts within the header tags.

Example 4

HTML:
<h1>This is h1 text.</h1>
<h2>This is h2 text.</h2>
<h3>This is h3 text.</h3>
<h4>This is h4 text.</h4>
<h5>This is h5 text.</h5>
<h6>This is h6 text.</h6>

Display:
This is h1 text.
This is h2 text.
This is h3 text.
This is h4 text.
This is h5 text.
This is h6 text.

<center>

The <center> tag causes all the text within the tag to be centered. An example is as follows:

Example 5


HTML:
<center>This is centered text.</center>

Display:
This is centered text.




The
 tag indicates a line break. This tag is most often used by itself, without a corresponding closing tag.

<p>

The <p> tag indicates a new paragraph. It is the same as

. This tag is most often used by itself, without a corresponding closing tag.