Colorful Webpage(Color Specification)


When we creating webpage,We want to change the color of headings,background,text,cells of tables,borders etc.We can change the colors in following ways.

(1.)Using Color names

(2.)Using Hexadecimal code

(1.)Using Color names :-In this method,We can specify the color by its name such as RED,GREEN,BLUE,BLACK in HTML 4.X.The sixteen (16) standard color’s names are the legal color name that are Black,White,Yellow,Green,Blue,Red,Maroon,Gray,Olive,Purple,Silver,Teal,Navy,Aqua,Fuchsia,Lime etc.The color names may be case-sensitive depending upon browsers.e.g

<HTML>

<Head>

<Title>colorful webpage </Title>

</Head>

<Body BGCOLOR=”Red”>

<font color=”green”>Txt in Green color</font><br>

<font size=”3″>Text of size 3</font>

</Body>

</HTML>

 

 

 

 

 

 

Output:

 

 

 

 

 

 

(2.)Using Hexadecimal code :-This is the another method to giving color names.It allows you to select millions of colors which is not possible using color names.The format for hexadecimal code is #RRGGBB.This represent the amount of Red,Green and Blue color.All the color that constitute an image is a combination of Red,Green and Blue.

COLOR HEXADECIMAL COLOR RGB
#60 RGB(0,0,0)
#FF0000 RGB(255,0,0)
#00FF00 RGB(0,255,0)
#0000FF RGB(0,0,255)
#FFFF00 RGB(255,255,0)
#00FFFF RGB(0,255,255)
#FF00FF RGB(255,0,255)
#FFFFFF RGB(255,255,255)
#COCOCO RGB(192,192,192)

<HTML>

<Head>

<Title> colorful webpage</Title>

</Head>

<Body>

<Body BGCOLOR=”#FF0000″>

<font color=”00FF00″>Text in Green color</font><br>

<font size=”3″>Text of size 3</font>

</HTML>

Output:

 

 

 

 

 

 

 

Comments are closed.