I can't rely my css page to my html page.

Closed
Zack - Updated on Aug 4, 2022 at 12:52 PM
gulshan212 Posts 5 Registration date Monday November 28, 2022 Status Member Last seen April 25, 2023 - Apr 13, 2023 at 03:21 AM

Hi, I am coding since one year and a half now, I've always been doing like I am now and it doesn't work! I don't know what I am doing wrong. Please help me!

here is the code.

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

    <title>Parti Bleu|ESDP</title>

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

</head>

<body>



</body>

</html>
Related:

3 responses

unitedwebsoft Posts 1 Registration date Wednesday November 2, 2022 Status Member Last seen November 2, 2022
Updated on Apr 13, 2023 at 04:59 AM

It seems that your html file and css file is not located in right folder or specified css path is incorrect.

For example if your html file inside 'site' folder then css path should be 'css/styles.css'

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

0
evelinchamplin Posts 8 Registration date Friday November 4, 2022 Status Member Last seen November 14, 2022
Nov 4, 2022 at 03:38 AM

Never knew about that tip so I think that is really helpful. I might have to give it a try and see whether it will make things earied for me when I code.


0
gulshan212 Posts 5 Registration date Monday November 28, 2022 Status Member Last seen April 25, 2023
Updated on Apr 13, 2023 at 04:59 AM

Hello this is Gulshan Negi

Well, the code you provided does not contain any errors in terms of HTML syntax. However, it's possible that an error could occur if the linked stylesheet file "styles.css" does not exist in the specified location "site/css".

It's important to ensure that the file path specified in the href attribute of the <link> tag is correct and the file "styles.css" actually exists in that location. If the file path is incorrect or the file does not exist, the browser will not be able to apply the styles defined in the stylesheet to the webpage.

I hope you are clear now.

Thanks

0