Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Patrick DeSisto
Patrick DeSisto
3,007 Points

<link rel="stylesheet" href="css/main.css"> not linking main.css to index.html

I am redoing the first 3 tracks after a long break and am confused as to why my 'normalize.css & main.css' links are not connecting these files to my 'index.html' file.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Patrick D | Human</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html">

both my css files are in the CSS folder, are spelt correctly and are labeled .css. I must be missing something obvious but it all looks right. Would appreciate the solution as soon as possible.

Thanks

3 Answers

Clinton Hopgood
Clinton Hopgood
7,825 Points

If the main.css is in the same folder as the index.html: <link rel="stylesheet" type="text/css" href="main.css">

If the main.css is in a folder called css: <link rel="stylesheet" type="text/css" href="css/main.css">

Please provide the full index.html if still having trouble.

Nachiket Kumar
Nachiket Kumar
3,590 Points

Where is your CSS folder located? Is it at the same level as your index.html file?

Patrick DeSisto
Patrick DeSisto
3,007 Points

Turns out the problem was I named my css folder in all caps. Thanks for the responses gentlemen.