HTML
HTML Colors
¶HTML Colors
HTML Colors are the colors used in HTML (Hypertext Markup Language) documents to style the appearance of web pages. Colors are an important aspect of web design as they help to make a website visually appealing and engaging.
There are various ways to specify colors in HTML, including using color names, hexadecimal codes, RGB (Red, Green, Blue) values, and more. Each method has its own syntax for specifying colors.
¶Hexadecimal Codes:
Hexadecimal codes represent colors using a combination of six numbers and letters. For example, the color white is represented by #FFFFFF
and black is represented by#000000
. Other colors have their own unique hexadecimal codes.
Here are some examples of hexadecimal codes and their corresponding colors:
-
#000000
- Black -
#FFFFFF
- White -
#FF0000
- Red -
#00FF00
- Green -
#0000FF
- Blue -
#FFFF00
- Yellow -
#FF00FF
- Magenta -
#00FFFF
- Cyan
¶Example
<!DOCTYPE html>
<html>
<head>
<title>Hexadecimal color</title>
</head>
<body text = "#FFFF00" bgcolor = "#0000FF">
<h2>Defferent color Hexadecimal codes</h2>
<table bgcolor ="#00FF00">
<tr>
<td color="#FFFFFF">Favourite Icon</td>
</tr>
</table>
</body>
</html>
¶RGB Values:
RGB values refer to the combination of red, green, and blue values that make up a color. Each value can range from 0 to 255, and the three values are separated by commas. For example, the color white has an RGB value of (255, 255, 255), while black has an RGB value of (0, 0, 0).
Here are some examples of RGB values and their corresponding colors:
-
rgb(0, 0, 0) - Black
-
rgb(255, 255, 255) - White
-
rgb(255, 0, 0) - Red
-
rgb(0, 255, 0) - Green
-
rgb(0, 0, 255) - Blue
-
rgb(255, 255, 0) - Yellow
-
rgb(255, 0, 255) - Magenta
-
rgb(0, 255, 255) - Cyan
¶Example
<!DOCTYPE html>
<html>
<head>
<title>RGB Color</title>
</head>
<body text = "rgb(0, 0, 0)" bgcolor = "rgb(0, 255, 0)">
<h2>Defferent color RGB codes</h2>
<table bgcolor ="rgb(255, 255, 0)">
<tr>
<td color="rgb(255, 255, 255)">Favourite Icon</td>
</tr>
</table>
</body>
</html>
¶Color Names:
HTML Color Names are a set of predefined color names that can be used in HTML and CSS documents. These color names provide a convenient way to specify colors using easy-to-remember words rather than numerical values such as hexadecimal or RGB codes.
Here is a list of the standard HTML color names along with their corresponding color: aqua , black, fuchsia, gray, green, lime, maroon, navy, orange, red, silver, white,yellow etc.
¶Example
<!DOCTYPE html>
<html>
<head>
<title>Color Name</title>
</head>
<body text = "green" bgcolor = "yellow">
<h2>Defferent color RGB codes</h2>
<table bgcolor ="black">
<tr>
<td color="white">Favourite Icon</td>
</tr>
</table>
</body>
</html>
HTML color codes are an important part of web design and can be used to create visually appealing and engaging websites.
All Tutorials in this playlist
Popular Tutorials
Categories
-
Artificial Intelligence (AI)
11
-
Bash Scripting
1
-
Bootstrap CSS
0
-
C Programming
14
-
C#
0
-
ChatGPT
1
-
Code Editor
2
-
Computer Engineering
3
-
CSS
28
-
Data Structure and Algorithm
18
-
Design Pattern in PHP
2
-
Design Patterns - Clean Code
1
-
E-Book
1
-
Git Commands
1
-
HTML
19
-
Interview Prepration
2
-
Java Programming
0
-
JavaScript
12
-
Laravel PHP Framework
37
-
Mysql
1
-
Node JS
1
-
Online Business
0
-
PHP
28
-
Programming
8
-
Python
12
-
React Js
19
-
React Native
1
-
Redux
2
-
Rust Programming
15
-
SEO - Search Engine Optimization
1
-
Tailwind CSS
1
-
Typescript
10
-
Uncategorized
0
-
Vue JS
1
-
Windows Operating system
1
-
Woocommerce
1
-
WordPress Development
2
Tags
- Artificial Intelligence (AI)
- Bash Scripting
- Business
- C
- C Programming
- C-sharp programming
- C++
- Code Editor
- Computer Engineering
- CSS
- Data Structure and Algorithm
- Database
- Design pattern
- Express JS
- git
- Git Commands
- github
- HTML
- Java
- JavaScript
- Laravel
- Mathematics
- MongoDB
- Mysql
- Node JS
- PHP
- Programming
- Python
- React Js
- Redux
- Rust Programming Language
- SEO
- TypeScript
- Vue JS
- Windows terminal
- Woocommerce
- WordPress
- WordPress Plugin Development