Tutorials & Script Homepage
HTML/DHTML 15to21
Using Blockquotes
Using Teletype
Font Size
Font Colour
Bold and Italic Text
Comment Tags
Mailto Tags
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
HTML/DHTML TUTORIAL NUMBER : 18
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.
This tutorial has been created by: WebMonkey

Font Colour

<body text=?> sets the font color
<body link=?> sets the color of links
<body vlink=?> sets the color of followed links
<body alink=?> sets the color of links on click
<font color=?> changes font color
</font> returns font to default color

There are two ways to color text on the Web. One approach is to set the colors for the entire document — specified in the body tag — and the other is to set and change colors as you move through the document, using the font tag. While less flexible, the body tag is often more practical than the font tag, and it's also supported by more browsers. So we'll start there.

Using the body tag, you can set the stage for your entire document, specifying the colors for regular text, links (normally blue), and followed links (usually red). Remember, however, that colors are specified using a numerical code. In the background color tutorial, we explain how to calculate this code. But for now, you can just take our word that each number represents a specific hue.

If you type:

<body text=#9932cd link=#ff0000 vlink=#00ff00 alink=#000000>

You will get a nearly illegible, but correctly colored page, with green text and red links that turn black on click, and violet after they've been followed.

But what if three colors aren't enough? Or what if you only want to color a single word? Well, lucky for you (if not the rest of us), Netscape's font tags let you do it. If you write in your HTML file:

<font color=#00ff00>green</font> with envy.

You'll get:

green with envy.

You could even change the color of individual letters, if you really wanted to:

Joseph and the amazing
      <font color=#ff0000>T</font>
      <font color=#ff7f00>E</font>
      <font color=#ffff00>C</font>
      <font color=#00ff00>H</font>
      <font color=#0000ff>N</font>
      <font color=#6b238e>I</font>
      <font color=#9932cd>C</font>
      <font color=#ff0000>O</font>
      <font color=#ff7f00>L</font>
      <font color=#ffff00>O</font>
      <font color=#00ff00>R</font>
      dreamtag

Will give you:

Joseph and the amazing T E C H N I C O L O R dreamtag

Which, frankly speaking, was hardly worth the effort. But that's not the point. The point is — you can.

As with all Netscape-specific tags, you should keep in mind that not all browsers support font color.

I hope this came in useful!
Ask in the forum if you have any suggestions or comments.

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  cctv cameras  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Top web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites