HTML basic tutorial color representation
html Color Representation
There are three ways to express colors in web pages:
Color words: blue, green, red, yellow
- ##Decimal representation: rgb(255,0,0), rgb(0,255,0), rgb(0,0,255)
- Hexadecimal representation: #FF0000 (red), #00FF00 (green), #0000FF (blue)
red light(red), green light(green), blue(blue).
In computers, each primary color uses 8-bit binary (2^8 = 256), so RGB can represent a total of 256*256*256 = 16.7 million colors. When using hexadecimal to represent color: use 2 hexadecimal digits to represent 1 digit of the primary color.| Color words | ##red | green | blue | yellow |
| Decimal | rgb(255,0,0) | ##rgb(0,255,0) ## rgb(0,0,255) | rgb(255,255,0) | |
#FF0000 | #00FF00 | #0000FF | #FFFF00 | ##Note: Decimal compatibility is not good, so use it as little as possible. Decimal color representation, commonly used in CSS. |
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>这是我们的第一个页面</title> </head> <body> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <table border="1" rules="all"> <tr> <td bgcolor="#FF0000" width="50">红</td> <td bgcolor="#FF0055" width="50"></td> <td bgcolor="#FF00bb" width="50"></td> </tr> <tr> <td bgcolor="#00FF00" width="50">绿</td> <td bgcolor="#00FF55" width="50"></td> <td bgcolor="#00FFbb" width="50"></td> </tr> <tr> <td bgcolor="#0000FF" width="50">蓝</td> <td bgcolor="#0055FF" width="50"></td> <td bgcolor="#00bbFF" width="50"></td> </tr> </table> </body> </html>
new file
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>这是我们的第一个页面</title>
</head>
<body>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table border="1" rules="all">
<tr>
<td bgcolor="#FF0000" width="50">红</td>
<td bgcolor="#FF0055" width="50"></td>
<td bgcolor="#FF00bb" width="50"></td>
</tr>
<tr>
<td bgcolor="#00FF00" width="50">绿</td>
<td bgcolor="#00FF55" width="50"></td>
<td bgcolor="#00FFbb" width="50"></td>
</tr>
<tr>
<td bgcolor="#0000FF" width="50">蓝</td>
<td bgcolor="#0055FF" width="50"></td>
<td bgcolor="#00bbFF" width="50"></td>
</tr>
</table>
</body>
</html>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















