Tell us what’s happening:
Describe your issue in detail here.
This is the Responsive Web Design HTML forms exercise step 9. I have no idea what this is asking me to do - it says to add in the colour in the body element selector? I’ve added it in for bakground color but it doesnt work for text color?
**Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
</body>
</html>
So you need to know three things to understant it better.
1- What is a CSS selector?
2- What is property in CSS?
3- What is value in CSS?
Let’s make an example.
CSS selector {
property: value;
}
Further example:
p { --> Your **CSS selector** is p here. Whatever you write within that curly brackets will apply for all of the p elements in your document.
color: red; --> color is the **property** and red is the **value**.
}
Note that background-color and color properties are two different properties and they don’t do the same thing.
color → Changes the text color.
background-color → Changes the background color of an element.
Answer for step 9
body {
background-color: #1b1b32; --> #1b1b32 is a hexadecimal color code value.
color: #f5f6f7;
width: 100%;
height: 100vh;
margin: 0;
}
Sources that might help you to have a better understanding