This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

2335 points
136056671d0ccfcab7292aa1466c5672?s=140&d=retro
Submitted by
Greg Watson
over 4 years ago

The answer should be right, but still not correct...

Has anyone else encountered this? This is my code:

/Add your CSS below!/
h1 {
font-family: Times, serif
}
h2 {
font-family: Verdana, sans-serif
}
h3 {
font-family: Vivaldi, cursive
}

This is the error:

Oops, try again.
Did you remember to put Times and a comma between font-family and serif?

Any thoughts? Thanks!


2 votes

permalink

Figured it out. I had to add semi-colons to the end of each font-family line.

2335 points
136056671d0ccfcab7292aa1466c5672?s=140&d=retro
Submitted by
Greg Watson
over 4 years ago

6 Comments

C4b8e4c9612ceb322ce8541f381c3716?s=140&d=retro Tomas Alijevas over 4 years ago

its weird that in some exercises it doesnt ask to add semicolon at the end if you have only 1 property but it did in this one

C1fa4698892fb0a44678bcf7cd14e735?s=140&d=retro Giraficy over 4 years ago

It's good to teach usage of semicolons, even though it wouldn't be needed in some cases.

5191827056149c025d0002a0_966077987 Luis Salinas over 4 years ago

had the same problem weird though

A29eff8fb52468082322dd35213f9178?s=140&d=retro geds40 over 4 years ago

You should only need to add the semi-colons at the end of the line if another selector/property follows before the closing }

5793e37558212240e90003fd_774329516 iiRosie1 about 2 years ago

Yup semi colons are important.

5793e37558212240e90003fd_774329516 iiRosie1 about 2 years ago

Good job!


0 votes

permalink

Put a semi-colon ; at the end of every line that has the font-family thingy. Example:

h2{
    font-family: Verdana, sans-serif;
}

642 points
5793e37558212240e90003fd_774329516
Submitted by
iiRosie1
about 2 years ago

1 Comment

5793e37558212240e90003fd_774329516 iiRosie1 about 2 years ago

Semi colons are important in this case.