How to correctly assign paths linking HTML files and CSS files?
P粉926174288
P粉926174288 2023-09-03 20:30:26
0
1
519
<p>So I have a folder on my desktop called "Project 1" with two other folders in it, one called "HTML" which has my HTML files in it and another called "CSS" , which contains my CSS files. How to link HTML file to CSS with pathname? </p>
P粉926174288
P粉926174288

reply all(1)
P粉350036783

reh!

If this is your folder structure:

Project 1
 |-- HTML
 |   |  index.html
 |
 |-- CSS
 |   |  style.css

Then in index.html you need to link it like this:

<link href='../CSS/style.css' rel='stylesheet' />

This is a relative path, so starting from index.html you have to go up one level (../) and go into the CSS folder ( CSS/) and select the file (here style.css).

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template