Thursday, March 11, 2010

Using Colors in HTML

This chart shows the names of colors that can be used in HTML.  In this example, I'm using the actual name to select a color.  Realize that the background color will make a difference in how the font color looks.  (Note the difference between the 'DarkRed' on black in the chart, and the 'DarkRed' on white in the example).

Set Markup Html On Entmap Off Spool On Preformat Off  
Set Term Off
Spool ColorTest.Html

Select 
    '<Font Color="LightSeaGreen">'|| EmpNo    ||'</Font>' As Empno
  , '<Font Color="DarkRed">'      || EName    ||'</Font>' As EName
  , '<Font Color="Magenta">'      || Hiredate ||'</Font>' As Hiredate
From Emp
Where Deptno = 20;

Spool Off
Set Markup Html Off Entmap Off Spool Off Preformat Off 
Set Term On

It will generate the HTML report shown below.

No comments:

Post a Comment