asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Web Imaging Essentials > Colors and Backgrounds

Web Imaging Essentials

Abakada ~ Back to Basics


Colors and Backgrounds

In HTML and CSS, colors are specified in either of two ways: by using a color name or by using numbers to denote a red-green-blue (RGB) color value.

Specifying color names

HTML has defined 16 basic color keywords that all browsers support. Any element with a color property (e.g., 'color', 'background', etc.) can take one of the following names. The basic color names are:

aqua   black   blue   fuchsia  
gray   green   lime   maroon  
navy   olive   purple   red  
silver   teal   white   yellow  

NOTE: As HTML formatting have been deprecated in favor of style sheets, the discussions here refer to specifying colors in CSS, except when noted.

For example, the following CSS rule defines the default background and foreground colors of a page.

BODY {background:navy; color:lime}
More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note