Skip to content
← Back to Community
why is my css not linking with my html
Profile icon
Fadrep

I need help linking my html with the css.
What can i use to make my tables to be in line and also in the center of the page.

Voters
Profile icon
AritroC
Profile icon
Fadrep
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

Solution

your css file is named style.css. But you are linking styles.css. So try linking the correct thing.

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

like that.
That should work

Profile icon
tussiez

@Fadrep, it appears you've made a typo on line 5 of index.html. Instead of referencing style.css, you typed styles.css. If you change it to the correct filename, you should be good to go!
No biggie, just a typo :)

Profile icon
EpicGamer007

the css file is called style.css, not styles.css. change the <link href="styles.css" rel="stylesheet" type="text/css"/> on line 5 to <link href="style.css" rel="stylesheet"/>

Profile icon
19wintersp

You've simply misspelled the filename; the href specified in the <link> tag needs to match the name of your file:

<link href="styles.css" rel="stylesheet" type="text/css"/> <!-- wrong --> <link href="style.css" rel="stylesheet" type="text/css"/> <!-- good -->
Profile icon
EpicGamer007

@19wintersp u dont need the type

Profile icon
19wintersp

@EpicGamer007 You don't, but I have no need to change that code. It works, I don't need to meddle with it. I will change what needs to be changed, and no more. The principle of least impact applies here. If I have no need to touch it, I shall leave it.