525,572 views
45 votes
45 votes
Hello! I am having trouble with this code and I am trying to find out the error. (html5 by the way.)

body {
background-color: lightblue;
color: deeppink;
}

h1 {
width: 100%;
}

{
float: right;
width: 200px;
margin: 10px;
border-radius: 20px;
}

p {
text-align: left;
font-family: fantasy;
font-size: 14px;
}

User DoubleVoid
by
3.0k points

1 Answer

14 votes
14 votes

Step-by-step explanation:

On line 10 you wrote:

{

float: right;

width: 200px;

margin: 10px;

border-radius: 20px;

}

This is the origin of your error. You have not declared any selector for the properties. Remember CSS rules take the following form:

selector {

property: value;

}

User Nayem Jaman Tusher
by
3.1k points