CSS - Color Property + Little Challenge!
Table of contents
Heyy all! I am Amena, and today we'll be learning about Color Property In CSS!
Get Started!
- It helps to set the COLOR of the text.
Now, to run it and try it out, you've to write the code in your html
and css
files :)
Little Challenge! ๐
Firstly, in your HTML file, you have to make an
h1
tag & inside it write your name!You must link both files!
After that, go to your CSS file and target the
h1
tag & apply the color to whatever you want.
Let me show you, how I've done this!
Solution! ๐
HTML CODE ๐
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Text-Properties</title>
</head>
<body>
<h1>Amena</h1>
</body>
</html>
I made a boilerplate by hitting
!
and after that gave the title to "Text-Properties".Then I made a
h1
tag and write my name as I told you!
CSS CODE ๐
h1{
color: brown;
}
- I targeted the
h1
tag and applied the color brown...You can apply whatever color you want!
Output! ๐
You have learned the Color Property! ๐
That is it for today, and I'll see you guys in the next one! Bye! ๐
ย