Linking the CSS file - help please

Hi all,

I’m currently doing the following exercise:
https://www.codecademy.com/courses/learn-css/lessons/css-setup-selectors/exercises/link-html-css?action=resume_content_item

In the exercise I have my style sheet, and I link it in the HTML, however the output has no change.

Here’s what I have in my head:

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

Thinking it may be the href that I am getting wrong, I’ve also tried just typing “style.css” and also “https://www.codecademy.com/stylesheets/style.css” however neither of these make any changes either.

This is what is in my style sheet style.css:

  <style>
    p {
      color: green;
      font-family: Arial;
    }
  </style>

The exercise lets me continue and acknowledged that I got each part of the instructions “correct” however I am concerned that by not understanding what I am doing wrong here, I am missing out on learning something valuable.

Thank you for any assistance.

EDIT:

I’ve experimented by adding this to my style.css:

  <style>
p {
  color: blue;
  font-family: Arial;
}
h1 {
  color: blue;
  font-family: Arial;
}
  </style>

Sure enough, the text in my h1 changed to blue, and is written in arial. However the text in my p is still black, and still in whatever the default font is.

Thanks again for any assistance.

EDIT 2 - SOLVED
If any other newbies has this issue, I’ve found that what is causing it to happen is that in my .css file I had it start with and with with which are not supposed to be there and are causing the issue.

2 Likes

was it the period in front of the forward slash (/)style.css?

Hi Theodis

If you need help, please paste in your code, lesson URL, error or difficulty you are experiencing

To chipmaster10562:

Great job!! You stuck to it and you finally solved the problem!