Can't link CSS to HTML file

i can’t link my html file to my style.css file

Hey, @DivineGift welcome to the forums!

Can you please provide a link to the Repl? This way it is easier for staff and members of the community to help you!

Also, see this guide on how to share your code:

2 Likes

https://replit.com/@DivineGift/-basiscom#index.html

1 Like

The page seems to return a 404. Is the Repl your having trouble with private?

1 Like

https://replit.com/@DivineGift/Html-basicscom#index.html

1 Like

Your current code doesn’t work because you are using a double slash instead of ./Changing it to <link rel="stylesheet" href="./style.css"> should solve the problem and successfully link your stylesheet.

3 Likes

Help me link it tried that link rel still didn’t work

Tried what you said but still no success

@DivineGift It’s weird that it doesn’t work, you can always use the <style> tag in HTML

<h1>Hello World!</h1>

<style>
  h1 {
    color: blue;
  }
</style>
3 Likes

@DivineGift you have errors in your code

original:

    <meta name="description"
    content="This is what google will show you"
      <link rel="stylesheet" href="./style.css"/>

change that to

    <meta name="description" content="This is what google will show you" />
    <link rel="stylesheet" href="./style.css" />
5 Likes