skip to Main Content

This is an image of my workspace
VS CODE IMAGE HTML

This is an image of my CSS workspace
VS CODE IMAGE CSS

VS Code links the styles.css in the href="styles.css" line in the link tag and that leads me perfectly to the styles.css file so I’m unsure why it is not linking. I have tried a lot of things from the internet and nothing has worked.

5

Answers


  1. Change stylesheets into stylesheet remove s

    <link rel='stylesheet' href='styles.css' type='text/css' media='all'/>
    
    Login or Signup to reply.
  2. Try this out:

    <link rel="stylesheet" type="text/css" href="styles.css">
    Login or Signup to reply.
  3. change your file path

    <link rel="stylesheet" type="text/css" href="./styles.css">
    
    Login or Signup to reply.
  4. it should be -> link rel=’stylesheet’

    you have mistakenly added and extra "s" as "stylesheets"

    Login or Signup to reply.
  5. All the answers that say to remove the trailing s are correct.
    Here’s a link to the MDN web docs on the element. p.s., don’t feel bad about this, it’s just a simple mistake that anyone can make.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search