Skip to content
← Back to Community
Please help, my CSS isn't linking to my HTML
Profile icon
MsHopkins

Hello Everyone,

I'm new to repl.it and to coding, trying to use the text editor to make a CodeAcademy tutorial. I'm having some bother getting my CSS to style my HTML. It doesn't show in the repl.it preview. I've checked the linking tag in the head of the HTML document, which appears to be correct.

If anyone could help resolve this issue, I'd be really grateful.

Thank you in advance.

Voters
Profile icon
MsHopkins
Comments
hotnewtop
Profile icon
alvessdan

I am having a similar issue. Please, does anyone can give me a little help? Any tips. Thanks!

My first web page

Screen Shot 2022-01-28 at 09.45.38

Profile icon
ash15khng

Ah since you put your css file in the path /resources/css/style.css you need to use this path in your link tag.

Profile icon
MsHopkins

@ash15khng Brilliant. Thanks so much!

Profile icon
SixBeeps

The href path to the CSS file is wrong, it should be "resources/css/style.css"

Profile icon
MsHopkins

@SixBeeps Thank you, all sorted. I appreciate the help.

Profile icon
Bookie0

<link href="style.css" rel="stylesheet" type="text/css" />

Copy paste this into the index, and the CSS should be linked. But normally, when you open a new repl in html on repl, the CSS should already be connected

But also it might be because you out the css file in a folder. Maybe take it out?

Profile icon
MsHopkins

@Bookie0 Thank you, all sorted. I appreciate the help.

Profile icon
Bookie0