Tea Cozy HTML CSS link

Hi there. New to HTML and following the Web Development path.

Using Atom for the off-site project Tea Cozy and having trouble linking HTML and CSS.

Tried to follow the online tutorial and re-read the part of the path that explains linking, but still cannot find the error that’s preventing me from linking the pages appropriately. Hoping this is an easy beginner mistake I can’t identify.

Any help is appreciated. Screenshot is the HTML doc.

Replying with screenshot of CSS doc.

you need to do ./style.css instead of style.css

Okay. I changed the href to ./style.css instead and saved, but the page still loads without any CSS formatting.

It looks like the css file is inside of the css folder, and the path will need to reflect that. So the path must go through that folder first, something like ./css/style.css or ./resources/css/style.css (I can’t tell which from the image)

2 Likes

Yes, I followed the same set-up that was described for the Desmoto project.

The second of the two suggestions worked, thank you!

Quick question: in HTML language, why do I need the “.” prior to the pathway “/resources/css/style.css”?

Awesome!

You use the . to indicate that it is a relative file path, so it indicates that the path is starting from the current folder level and moving down from there.

1 Like