Imagine a web page without colors… a deadly boredom! So in this lesson, we will talk about colors and how HTML handles and recognizes them.
In HTML, colors are managed through specific codes called Hexadecimal Codes. Each color is assigned a code consisting of 6 characters made up of numbers and letters.
To be validated, Hexadecimal Codes are preceded by a special symbol represented by the “Hash” symbol #, so the correct syntax for writing a code in HTML is: “#Hexadecimal Code”
Below is the table of the 16 colors and their respective codes recognized by all web browsers: Clearly, there are other colors beyond these 16.
Suppose we have chosen the color for a hypothetical background of our page. The corresponding Hexadecimal code must be written in this way:
“#00ffff”
Pubblicato in HTML & CSS
Be the first to comment