There are three ways to represent colors in HTML, the most commonly used is the 6-digit hexadecimal code representation. For example, bgcolor=#ff0000; where # simply means declaring the color using a 6-digit hexadecimal color code. The first two digits of the code, ff, represent red among the three primary colors. The range is of course 00-ff in hexadecimal. The middle two digits, 00, represent green, and the last two digits, 00, represent blue. 00 represents no color, and ff represents the strongest color. So 000000 represents black, ffffff represents white, similarly ff0000 represents pure red, 00ff00 represents pure green, and 0000ff represents pure blue. In addition, colors can also be expressed by RGB (r, g, b). The r, g, and b in the brackets represent red, green, and blue respectively using decimal numbers or percentages from 0 to 255. For example, rgb (255, 0, 0) and rgb (100%, 0%, 0%) both represent red. Colors can also be represented by color keywords, a total of 16, namely: Black#000000 Maroon dark brown#800000 Green Green#008000 Olive #808000 Navy Blue#000080 Purple Purple#800080 Teal #008080 Gray Gray#808080 Silver#C0C0C0 Red Red#FF0000 Lime #00FF00 Yellow Yellow#FFFF00 Blue #0000FF Fuchsia Magenta #FF00FF Aqua blue#00FFFF White#FFFFFF For example, you can write: bgcolor=red, which is equivalent to the following: Copy code The code is as follows:bgcolor=rgb(255,0,0),bgcolor=rgb(100%,0%,0%),bgcolor=#ff0000; |
<<: Linux completely removes node.js and reinstalls it through the yum command
>>: Thoughts and experience sharing on interactive design of reading lists for information products
Table of contents Example Code Rendering Code Ana...
Preface: Recently, I encountered a management sys...
I have previously written an article about file t...
Copy code The code is as follows: html { overflow...
1. concat() function Function: Concatenate multip...
HTML reuse is a term that is rarely mentioned. Tod...
Table of contents What is front-end routing? How ...
1. Create a SpringBooot project and package it in...
First, let me explain the version of MySQL: mysql...
Table of contents Preface sql_mode explained The ...
This article example shares the specific code of ...
I saw a good idea and recorded it. I have used jQ...
As a newbie who has just come into contact with t...
Table of contents 1. What is DOM 2. Select elemen...
Use ifnull instead of isnull isnull is used to de...