Linking html with css with relative path


Hello all! >> newbie question … sorry <<

i’ve completed this lesson,
but i’m having trouble implementing it on my own.

If i link my html with css with the exact path, it works perfectly fine, but if i try to make it a relative path (both files are in the same folder) it doesn’t work. Can’t figure out what i’m doing wrong.

    <title>My Web Page!</title>
  /* href="/1st_try_style.css"  */
  rel="stylesheet" />

so, right now i have ‘href=“C:/coding/1st%20try/1st_try_style.css”’ active and is working fine

but if i “comment it out” and put this instead 'href="/1st_try_style.css"'
it does not apply the css contained styling any more. Surely i have made some mistake declaring it’s value, but what? Where is my mistake? Please help me see it. Thank you.


Have you tried leaving out the backslash


thank you for your reply :slight_smile:
yes, i’ve tried that :slight_smile: unfortunately it made no difference


scratch that… i’ve just tried it again, and it works!!! don’t know what i did before, but i sware i tried it… i also tried every combination i could thing of so i’ve probably combined it with smth i was not supposed to… either way it works now! and your answer was spot on! THANK YOU! :slight_smile: :smiley:


read a discussion


wow… some of those posts / links are not an easy read for me at this point, but it IS helpful as i’m slowly beginning to see the light, even if it’s not crystal clear yet, things are starting to take shape :slight_smile: Thank you again for your willingness to help me :slight_smile: *hug


As an extra
with the explanation what it meant when using
it would point to


You don’t have to copy the slash you can type when your website goes online it will work fine.

If not try your own… href="/1st_try_style.css" this will also works…


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.