CSS - Color Property + Little Challenge!

CSS - Color Property + Little Challenge!

ยท

1 min read

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! ๐Ÿ’›

ย