CSS Lesson 5 - help!


I’m having a problem with Learn CSS, lesson 9!

I think I have switched the style into the CSS tab correctly, and linked it back to the HTML tab, but the font on the mock website has not changed as it should have. Am I missing something super obvious? It’s all new to me, so I appreciate any help!

<!DOCTYPE html>

  <title>Vacation World</title>
  <link href="style.css" type="text/css" rel="stylesheet"/>

Hey @kcurran13 is this Lesson 9: ID Name

Can you share the instructions for the step you are on?

Lesson 5! I’m sorry! I mis-typed. It’s saying that I did everything correctly and allowing me to move on, but the font has not changed on the mock website.

The instructions say

  1. Let’s link the stylesheet style.css to the HTML file index.html.
    First, add a element within the section.

  2. Next, add the href attribute to the element and set it equal to style.css.
    Take a look at the web page in the browser to the right. Do you notice any changes?

  3. Next, add the type attribute and set it to the correct value.

  4. Finally, add the rel attribute and set it to the correct value.

Ok i will give it a quick look @kcurran13 do you know if the changes are carried over to the next lesson , Lesson 6: Tag Name?

Yes, the changes carry over, and when I make other changes in the CSS tab they occur on the webpage. So maybe it’s actually a problem with my font-family command? The CSS doc looks like this.

p { font-family: Arial; } h1 { color: maroon; } .title { color: teal; } .uppercase { text-transform: uppercase; }

Thanks a lot for your help!

Your font-family looks fine, also the challenge let you pass on the second lesson so we know it works, also when working on projects you can declare a default styling immediately after your preferred styling

for example there are 3 stylings here,
p {
font-family: Arial, Times;

Arial is your 1st preference, then Times as a default

Thanks a lot, Tommy! I’m so glad that it was correct. I was really confused as to what could be wrong. Guess I’ll just ignore it then. I understand what you’ve written about preferred and default styling - cool! Good to know.

1 Like

Yeah it was a very subtle change, when you run the challenge keep an eye on the paragraph element because that is what we selected for the lesson and you will the font style change to Arial…

I almost didnt see it myself so I played with the code removed it and ran it again
then pasted it
<link href="./style.css" type="text/css" rel="stylesheet">
then ran it again

Its looking for the “./” before the style.css

1 Like

@chrisconner Both links work with different file paths, I think this is because they are linked within the same folder :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.