Sublime Forum

HTML file won't link with CSS file

#1

I’m creating my first website with the basics I learned so far. This is part of the code in HTML:

(For some reason the forum won’t show my code with <>…)

!DOCTYPE html
html
head
title My first project /title
link rel=“stylesheet” type=“text/css” href=“‪‪‪‪‪‪style.css”
/head
body
/body
/html

The first time I linked these files it worked instantly (they were saved on my desktop). However, I then decided to move the files into a folder (on my desktop) to organise. In the HTML file I then changed the path in the link tag, but then it didn’t work anymore. I tried everything.

All the tags are there.
The HTML and CSS file are in the same folder.
I tried both href=“style.css” and using the complete path name.
I tried different browsers.
I even deleted the original files, creating new files, copying the codes in there and save them.
I double checked the path names. Everything is correct.
I’ve searched several forums for a solution, but nothing works.

I must be missing something, but I can’t see or find it.

0 Likes

#2

Hi,

  1. This is Sublime’s technical support forum, http://stackoverflow.com might be a better place to ask for help

  2. To post your code with special symbols you have to surround it with a backtick\backquote signs like this:
    `code`

  3. I see not mistakes in your code at a first glance. Can you provide the folder structure and maybe the original files you are working with? You can paste them somewhere like https://pastebin.com/ for example

0 Likes