Home arrow HTML arrow Color Composition and HTML

Color Composition and HTML

The aim of this article is to make you understand the composition of colors and their relationship to HTML. You will learn how you can see a color and reproduce it using numbers.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 6
March 19, 2008
  1. · Color Composition and HTML
  2. · Possible Colors
  3. · Similarity in Colors
  4. · Making Colors Darker or Lighter

print this article

Color Composition and HTML
(Page 1 of 4 )

Many HTML elements can be given a color. Some of these elements can each have a foreground color and a background color. In the absence of the foreground color, you will see the background color. The foreground color is simply referred to as color. I assume for this article that you have basic knowledge of HTML and CSS. You do not need to be good in physics in order to understand this article.

You give an element a color by using Cascading Style Sheets. The code below gives the table cell a green color and a blue background color.



<style type="text/css">

td#td1 {color:red; background-color:blue}







<td id="td1">

Text color is red







There is a nuance here: the color (foreground-color) of a block element (e.g. BODY, DIV, Paragraph) is the color of the text and not another surface area.

Note how the color and background color have been indicated in the style sheet.

blog comments powered by Disqus

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials