top of page
Writer's pictureNew Era Education

Different custom Type of HTML Colors

In this section we will learn Different custom Type of HTML Colors

In HTML5 used colors to display web pages on the World Wide Web, and the methods for describing and specifying those colors. In HTML5 colors can be specified as an RGB triplet or in hexadecimal format or according to their common English names.

  1. bgcolor − In HTML5 it sets background color in the web page.

  2. text − Specify a color for the body text in page.

  3. alink − it specifies a color for active links or selected links.

  4. link − It used sets color for linked text in our documents.

  5. vlink − It can be set  color for visited links − that is, for linked text that you have already clicked on.

bgcolor − Let’s see the example how to set background of the page.

Example:-

<h1 style=”background-color:Blue;”>Hello World</h1> <p style=”background-color:Green;”>Lorem ipsum…</p>

text − Below is the example to set color for the body text.

Example:-

<h1 style=”color:Red;”>Hello World</h1> <p style=”color:Blue;”>Lorem ipsum…</p> <p style=”color:Green;”>Ut wisi enim…</p>

HTML Colors – Hex Codes TableColorColor HEX #000000 #FF0000 #00FF00 #0000FF #FFFF00 #00FFFF #FF00FF #C0C0C0 #FFFFFF

HTML Colors – RGB ValuesColorColor RGB rgb(0,0,0) rgb(255,0,0) rgb(0,255,0) rgb(0,0,255) rgb(255,255,0) rgb(0,255,255) rgb(255,0,255) rgb(192,192,192) rgb(255,255,255)

Lightness in HTML5ColorsLightHexRgbHsl 100%#ffffffrgb(255, 255,255)hsl(0, 100%, 100%) 95%#ffe6e6rgb(255, 230,230)hsl(0, 100%, 95%) 90%#ffccccrgb(255, 204,204)hsl(0, 100%, 90%) 85%#ffb3b3rgb(255, 179,179)hsl(0, 100%, 85%) 80%#ff9999rgb(255, 153,153)hsl(0, 100%, 80%) 75%#ff8080rgb(255, 128,128)hsl(0, 100%, 75%) 70%#ff6666rgb(255, 102, 102)hsl(0, 100%, 70%) 65%#ff4d4drgb(255, 77, 77)hsl(0, 100%, 65%) 60%#ff3333rgb(255, 51, 51)hsl(0, 100%, 60%) 55%#ff1a1argb(255, 26, 26)hsl(0, 100%, 55%) 50%#ff0000rgb(255, 0, 0)hsl(0, 100%, 50%) 45%#e60000rgb(230, 0, 0)hsl(0, 100%, 45%) 40%#cc0000rgb(204, 0, 0)hsl(0, 100%, 40%) 35%#b30000rgb(179, 0, 0)hsl(0, 100%, 35%) 30%#990000rgb(153, 0, 0)hsl(0, 100%, 30%) 25%#800000rgb(128, 0, 0)hsl(0, 100%, 25%) 20%#660000rgb(102, 0, 0)hsl(0, 100%, 20%) 15%#4d0000rgb(77, 0, 0)hsl(0, 100%, 15%) 10%#330000rgb(51, 0, 0)hsl(0, 100%, 10%) 5%#1a0000rgb(26, 0, 0)hsl(0, 100%, 5%) 0%#000000rgb(0, 0, 0)hsl(0, 100%, 0%)

Related Link

​​​​​​

2 views0 comments

Recent Posts

See All

Коментарі

Оцінка: 0 з 5 зірок.
Ще немає оцінок

Додайте оцінку
bottom of page