简体   繁体   中英

CSS and HTML will not link

I have been using external stylesheets just fine until a couple days ago. I don't know why I am no longer able to link to external stylesheets from my HTML since I have had no problems with it earlier. I absolutely cannot find the issue.
It will probably be obvious, but right now I am really frustrated.
Please Help!

My File Structure:
-Tutorial (folder) - index.html - stylesheet.css

 h1 { color: green; } 
 <!doctype html> <html> <head> <title>Hello</title> <link rel="stylesheet" href="stylesheet.css"> </head> <body> <h1>Testing...</h1> </body> </html> 

Note: It may run fine here on the snippet... but it will not link correctly in my HTML.

采用

 <link rel="stylesheet" href="./stylesheet.css"> 

Thanks you guys for the help! I found that I had this in my head:

<link rel="stylsheet" href="stylesheet.css">

I had spelled stylesheet wrong in the 'rel'.
It works fine now!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM