Home Page Tutorials Download Fonts Download Template Download Wallpapers Free Directory
 
 
LESSON 02
<Font> Tag
HTML Tutorials
Photoshop Tutorials With the Help of Font Tag you can set Font Name, Font Size and Font Color.
Flash Tutorials
1). Face = "Font Name" or Face = "Font Name1, Font Name2, Font Name3......."
ASP Tutorials

With the help of Face tag you can change font type of your text. You can also define a list of popular fonts with Face attribute, visitor's Browser will display the First Font Face and if it is not available then it check the other and so on. When none of the Specified Font Faces are available then browser show its default font face.

FAQ
 

<Font face= "Arial, Times Roman,Serif">......</Font>

<Font face = "Arial">......</Font>

The Name of Font Face must much the System Font Face Name exactly.The Default value is the Browser default.
2). Size = N

Specified the Font Size to be used. "N" is the number for Font Size whose value can be from 1 to 7.

The default value for the Font Size is 3.

1     2      3        4         5              6                 7

Cool Cool Cool Cool Cool Cool Cool

3). Color= Value/Name of the Color.
This tag is used to give color to your text.

If you specify the color value, it should be in Hexadecimal Number.

<Font color="#CCFFOO">...........</Font>

<Html>
<Head>
<Title>Example for Font Tag and Its Attributes</Title>
</Head>
<Body>
<font face ="Tahoma" size=4>With the help of Face tag you can change font type of your text. You can also define a list of popular fonts with Face attribute, visitor's Browser will display the First Font Face and if it is not available then it check the other and so on. When none of the Specified Font Faces are available then browser show its default font face.</font><font face="Times New Roman" size=2> With the help of font tag you can also change the size of font from</font> <font size=1>One</font> to <font size=7>Seven.</font> <font face="Georgia" size=5 color="green">You can also change the color of your document text with color attribute.
</Body>
</Html>
With the help of Face tag you can change font type of your text. You can also define a list of popular fonts with Face attribute, visitor's Browser will display the First Font Face and if it is not available then it check the other and so on. When none of the Specified Font Faces are available then browser show its default font face. With the help of font tag you can also change the size of font from One to Seven. You can also change the color of your document text with color attribute.

4). I = Text
  We use Italic tag to make things Italic. It comes in pairs:
 
 
 

<Html>
<Head>
<Title>Example for Italic Tag</Title>
</Head>
<Body text="#FFFFFF">
What a <i>day </i> today!!!!
</Body>
</Html>

What a day today!!!!

 

  5). B = Text
  Bold tag is used to make things bold.
 
<Html>
<Head>
<Title>Example for Bold Tag</Title>
</Head>
<Body text="#FFFFFF">
What a <b>day </b> today!!!!
</Body>
</Html>
What a day today!!!!

 

6). U = Text

  With the help of <U> you can underline your text.
 
<Html>
<Head>
<Title>Example for Underline Tag</Title>
</Head>
<Body text="#FFFFFF">
What a <u><b>day </b></u> today!!!!
</Body>
</Html>
What a day today!!!!
 

7). TT= Text

 

You can give your text a typewritter effect or mono-space font effect.

 
<Html>
<Head>
<Title>Example for TT Tag</Title>
</Head>
<Body>
What a <tt>day </tt> today!!!!
</Body>
</Html>
What a day today!!!!
  8). Strike= Text
 

With <Strike>,you can give strike through effect to your text.

 
 
 
<Html>
<Head>
<Title>Example for Strike Tag</Title>
</Head>
<Body text="#FFFFFF">
What a <strike>day </strike> today!!!!
</Body>
</Html>
What a day today!!!!
  9). Center= Text
 

<center></center> tag is used to align the text in the center of the page.

 
<Html>
<Head>
<Title>Example for Bold Tag</Title>
</Head>
<Body>
<center>Don't try to do this</center>
</Body>
</Html>
Don't try to do this
  10). Sub= Text
 

with the help of <sub></sub> tag you can subscript your text .

 
<Html>
<Head>
<Title>Example for Sub Tag</Title>
</Head>
<Body>
The Chemical formula of Water is H<sub>2</sub>O.
</Body>
</Html>
The Chemical formula of Water if H2O.
  11). Sup= Text
 

With this tag you can superscript your text.

 
<Html>
<Head>
<Title>Example for Sup Tag</Title>
</Head>
<Body>
(a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup>
</Body>
</Html>
(a+b)2=a2+2ab+b2
  12). Br= Text
 

Break tag is used to break a lineand starts a new line. No closing tag is required.

 
<Html>
<Head>
<Title>Example for Break Tag</Title>
</Head>
<Body>
The Name of my Country is Pakistan
</Body>
</Html>
The Name of my Country is
Pakistan
  13). P = Text
 

This element define a Paragraph element in a document.

 

<p>This is a first Paragraph</p>

<p> This is a second Paragraph with one line</p>

 

The elements of Paragraph can also be align (Left, Center, Right and justify ).

<p align = "right"> This is Second Paragraph with Right Alignment</p>

 
<Html>
<Head>
<Title>Example for Paragraph Tag</Title>
</Head>
<Body text="#FFFFFF">
<p> This Paragraph have no Alignment</p>
<p align = "right"> This is First Paragraph with Right Alignment</p>
<p align = "center"> This is Second Paragraph with Center Alignment</p>
<p align = "Left"> This is Third Paragraph with Left Alignment</p>
</Body>
</Html>

This Paragraph have no Alignment

This is First Paragraph with Right Alignment

This is Second Paragraph with Center Alignment

This is Third Paragraph with Left Alignment

 

  14). <Div>= Text
 

Its a second kind of Paragraph. Division tag is used to make a division and align the text. The only difference between <div> and <p> tags is that <div> tag does not take any space over and below the paragraph.

 

The elements of Division can also be align (Left, Center, Right and justify ).

 
<Div align = "right"> This is third Paragraph with Right Alignment</Div>
 
 
 
<Html>
<Head>
<Title>Example for Division Tag</Title>
</Head>
<Body text="#000000">
<div> This Paragraph have no Alignment</div>
<div align = "right"> This is First Paragraph with Right Alignment</div>
<div align = "center"> This is Second Paragraph with Center Alignment</div>
<div align = "Left"> This is Third Paragraph with Left Alignment</div>
</Body>
</Html>
This Paragraph have no Alignment
This is First Paragraph with Right Alignment
This is Second Paragraph with Center Alignment
This is Third Paragraph with Left Alignment
  15). Blockquote= Text
 

Its a third kind of Paragraph. which take space from over, below as well as from left and right sides of the Paragraph. With this tag you can high light some special text or paragraph.

 
<Html>
<Head>
<Title>Example for Blockquote Tag</Title>
</Head>
<Body>
This is a second chapter for <blockquote>HTML</blokquote>
</Body>
</Html>
This is a second chapter for
HTML
 

16). HTML define a series of Six heading from <H1>......<H6>

<h1>Heading1</h1>

<h2>......</h2><h3>.....</h3><h4>....</h4>

<h5>....</h5><h6>....</h6>

 

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
 

HTML also define Align elements for Heading element. You can align your Heading with left, Center, Right.

 
 
<Html>
<Head>
<Title>Example for Heading Tag</Title>
</Head>
<Body text="#FFFFFF">
<h1>Heading with size=1</h1>
<h2 align="right">Heading with size=1</h2>
<h3>Heading with size=1</h3>
<h4 align="center">Heading with size=1</h4>
<h5>Heading with size=1</h5>
<h6 align="left">Heading with size=1</h6>
</Body>
</Html>

Heading with size=1

Heading with size=2

Heading with size=3

Heading with size=4

Heading with size=5
Heading with size=6
  17). HR Horizontal Rule(<HR>)
 

This tag creates a horizontal line in the web page. By Default this tag creates a lines from left to right.

 

Attributes:

Width:

 

If you want that the line will only appears in the middle use <width> attributes as following:

<HR width = 50% >

 
Width value can be in percentage as well as in Pixels.
 

Size:

This attribute is use to change the default thickness of <HR> by assigning a value to the Size attribute.

<HR size = 5>

 
By Default the value is 2.
 

NoShade:

This attribute is use to disappear 3D effect of <HR>. By this attribute Line will be appear in gray shade.

<HR Noshade>

 
By Default this attribute is off. This attribute will only for IE.
 

<HR width = "25%" size ="5" Noshade>

 
<Html>
<Head>
<Title>Example for Horizontal Rule Tag</Title>
</Head>
<Body text="#FFFFFF">
Horizontal Rule with 50% width
<hr width=50%>
Horizontal Rule with size of 5
<hr size=5>
Horizontal Rule with 50% width and Noshade
<hr width=50% noshade>
</Body>
</Html>

Horizontal Rule with 50% width

 

Horizontal Rule with size of 5

 

Horizontal Rule with 50% width and Noshade

 
  18). Special Characters
 

There are some special sign or characters, which are not present on the keyboard for example:

 

*). Copyright Sign

*). Trademark Sign. etc

 

To write these special character in your web page you have to write a code. These codes will start with Ampersand(&) sign and ends with Semicolon(;) sign. For example for Copyright sign you should write:

&Copy;

or for Trademark sign write:

&trade;

  Click Here for a complete list of special characters.
 
 
[HTML Index]
 
 
Google
 
Web www.tutorialscenter.com
 
 

Copyright© 2006 All Rights Reserved.
Contact: webmaster@tutorialscenter.com, info@tutorialscenter.com, support@tutorialscenter.com