Change Text colors
Text colors can be changed using HTML or CSS. CSS is the newer standard and offers much more flexibility, but many people still prefer simple HTML. You may want to view the tutorial for changing text colors in the CSS Tutorials section of the site to compare the two methods.Using HTML, the <body> tag offers the first opportunity for color control of your text and links. Here is a body tag example with the text color options coded into it:
<body text="#ABC123" link="#ABC123" vlink="#ABC123" alink="#ABC123">
In the above body tag example, the ABC123 value in each attribute represents the hexidecimal code for the text colors of the elements shown. Each element can (and should) be a different color, and can also be expressed as a color name. Hex colors give a nearly unlimited palette of colors to choose from, while named colors only give you a 139 colors. You can learn more about color usage in the HTML Reference Charts section of this site.
If you do not specify the colors you want, the page will be displayed in the browsers default colors. Generally this will be black text on a white background, with blue links and purple visited links.
Here's what the different body attributes represent:
- TEXT = is the base text color on the page.
- LINK = is the color of the link text on the page.
- VLINK = is the color of an already visited link.
- ALINK = is supposed to make the link text flash another color when activating a link, but it usually happens too fast to notice, at least on my computer.
To use color names instead of using a hex code, leave out the hash mark that must be in front of hex code colors. Coding a body background color using a color name would look like:
<body link="red" >
You'll find a hex color utility and a named colors chart in the HTML Reference Charts section of this site. There are even better color utilities in my members-only site. You may want to learn about becoming a member.
» Color Change for Short Passages of Text
You can also change the text color for one or more words individually. To do that add this code:
<font color="green"> makes it green and </font > returns the text to its original color. How about that, my darling! ...just kidding, I'm already married.
Home |
HTML Tutorials |
HTML Quick Tips |
HTML Reference Charts
CSS Tutorials |
CSS Reference Chart |
Online Webmaster Tools
Design/Marketing Articles |
Web Glossary |
Web Design Software
Web Site Design Made Easy |
Products |
Members Site Info/Benefits
About This Site |
Frequently Asked Questions |
Privacy Statement
Copyright Notice |
Link Info |
Contact
Copyright 2005 htmlville.com and Dennis Gaskill
All Rights Reserved Worldwide
