🎨 *CSS Color and Its Properties
CSS (Cascading Style Sheets) allows web designers and developers to control the appearance of web elements, including their color. Color in CSS can be applied to text, backgrounds, borders, and other visual aspects of elements.
---
🔹 Color Values in CSS
CSS supports several ways to define colors:
1. Named Colors
Example : red, blue, green, black, white, etc.
color: blue;
2. Hexadecimal Colors
Format: #RRGGBB or #RGB
Example :
background-color: #ff5766;
3. RGB (Red, Green, Blue)
Format: rgb(red, green, blue)
Values: 0 to 255
color: rgb(255, 0, 0); /* Red */
RGBA (RGB + Alpha) Adds transparency
Format: rgba(red, green, blue, alpha)
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
5. HSL (Hue, Saturation, Lightness)
Format: hsl(hue, saturation%, lightness%)
color: hsl(120, 100%, 50%);
6. HSLA (HSL + Alpha)
color: hsla(240, 100%, 50%, 0.6);
🔸 Common CSS Color Properties
color
Sets the text color
background-color
Sets the background color of an element
border-color
Sets the color of the border
outline-color
Sets the color of the outline
text-decoration-color
Sets the color of text decoration (e.g., underline)
Don’t forget to like, share, and subscribe for more web development tutorials!
\#HTML #WebDevelopment #BeginnerTutorial #WebsiteStructure#webstyling#css
#HTMLBasics #vscode #LearnToCode #frontenddevelopment
#UniversalSelector #listeningskills#ElementSelector #programming#frontendcourse#external
#codewithharry #apnacollage #IDSelector#ClassSelector#developertools#developertoolsincss#colorinhtml#cololrproperties#colors#colorincss
#colorvalue#colorproperties
Visit:
/ @ltknowledgezone-d3p
Информация по комментариям в разработке