0% found this document useful (0 votes)
4 views2 pages

Computing 28th 11

HTML colours are used to define the appearance of elements on a web page, represented primarily through hexadecimal colour codes and RGB values. Hexadecimal codes use six digits to indicate the intensity of red, green, and blue, while RGB values use decimal numbers for the same purpose. Examples of both formats include #FF0000 for red in hexadecimal and rgb(255, 0, 0) in RGB.

Uploaded by

huznaz703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Computing 28th 11

HTML colours are used to define the appearance of elements on a web page, represented primarily through hexadecimal colour codes and RGB values. Hexadecimal codes use six digits to indicate the intensity of red, green, and blue, while RGB values use decimal numbers for the same purpose. Examples of both formats include #FF0000 for red in hexadecimal and rgb(255, 0, 0) in RGB.

Uploaded by

huznaz703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

HTML Colours

HTML colours are used to define the colour of text, background, borders,
and other elements on a web page. There are three main ways to
represent colours in HTML:

2. Hexadecimal Colour Codes:

 These codes use a combination of six hexadecimal digits (0-9, A-F)


to represent the intensity of red, green, and blue components of a
colour.

 The format is #RRGGBB, where RR represents the red component,


GG represents the green component, and BB represents the blue
component.

 Each component can range from 00 to FF (0 to 255 in decimal).

 Examples:

o #FF0000 (red)

o #00FF00 (green)

o #0000FF (blue)

o #FFFF00 (yellow)

o #000000 (black)

3. RGB Colour Values:

 These values specify the intensity of red, green, and blue


components using decimal numbers.

 The format is RGB (R, G, B), where R, G, and B represent the red,
green, and blue components, respectively.

 Each component can range from 0 to 255.

 Examples:

o rgb(255, 0, 0) (red)

o rgb(0, 255, 0) (green)

o rgb(0, 0, 255) (blue)

o rgb(255, 255, 0) (yellow)

o rgb(0, 0, 0) (black)

HTML Colours Huzaifa Nazir 8.D


HTML Colours Huzaifa Nazir 8.D

You might also like