Problem with 'shift' in font-family


#1

Within the large red box is where I've added my instructions, within the smaller red box is my instruced code however I've never dealt with 'shift' before so I'm not certain how to write it and I guess that's my error and I'm unsure how it's meant to be written. I've added a semi-colon to the end of sans-serif but it still says I'm wrong


#2

Looking to the left in the instructions...

"Shift", sans-serif


#3

Didn't work :confused:


#4
font-family: "Shift", sans-serif;

You forgotted the semicolon.


#5

I added it but it still says it's wrong


#6

Mmm? Show your code.


#7

.jumbotron h1 {
color: #fff;
font-size: 48px;
font-weight: bold;
font-family: "shift", sans-serif;
}

this is what it currently looks like


#8
.jumbotron h1 {
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    font-family: "Shift", sans-serif;
}

#9

That's what I've written. I don't understand what I'm doing wrong? The error message says: Inside the head element add the link element for the custom font
I've already done that in index.html






#10

Oh I now realize my mistake, I didn't include a '1' in the link when I was supposed to, thanks for your help! What a careless mistake


#11

The 1? You mean in h1? That was good.
Your code is exactly as mine, except that I write "Shift", not "shift".
Also remember to refresh the page when things like this happens.


#12

yep.
it's become a habit to write everything in lowercase.
thank you again


#13

The problem is not the lettercase, but the Codecademy interpreter. If it wants Shift, you write Shift even if you don't like it.


#14

Aside, with respect to lowercase font names...

Fonts have proper names, and are stored on the system by those names. It is always a good idea to use capitalization for all proper names else risk that somewhere in the works the name will not match the expected resource. Font families are generic, and not proper names so they can be lowercase, but fonts, be safe and always capitalize.

font-famiily: Shift, sans-serif;

is the recommended way to write a font declaration. When there are multiple terms in the name, we need to write them in quotes:

font-family: "Lucida Sans Unicode", Calibri, Arial, sans-serif;

The families are as follows:

sans-serif
serif
monospace
cursive
fantasy

It cannot be repeated enough how important it is that all font declarations end with a font-family as a fall back if no specified fonts are available. The system will supply a best fit for that computer, assuming one is set.