Monday, March 28, 2011

FONT TAG WITH ATTRIBUTES

Font tag is used to change the colour of text or fonts we write on the web page.We can change font style,colour and also size of that selected  fonts .
< font > tag
  • < font color=red >.............< /font >
  • < font size=7 >................< /font >
  • < font face ="Times new roman" >................. < /font >
A simple program with<  font >tag:
< html >
< head >
< title >HTML < /title >
< /head >
< body bgcolor=yellow text=blue >
< font color=red size=5 face="Times New Roman" > Hello ! < /font > How r u?
< /body >
< /html >




















Here I want to print "Hello ! " in red color and with some large size.In the < body > tag , I just open the < font > tag (write attributes according to my wish  i.e.< font color=red size=5 face="Times New Roman" >) and after that closed the tag.Open the tag before the selected  text you want to change the look of font and after that close the tag.
       Most interesting thing that you can also change the font style ..For this, just go to notepad's Format menu --Font.After that select the desired font style i.e " Times new roman "..copy ..and paste it in the program.Copy and paste is done just to avoid the spelling errors for font style.

No comments:

Post a Comment