My html file can't connect to my css file? [closed] - html

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have been trying to connect my html and css together but I just can't seem to.
this is what my looks like:
<head>
<meta charset="UTF-8" />
<title>Angels Site</title>
<link rel="stylesheet" type="text/css" href="./Users/angel/Desktop/webdevangela/css/styles.css">
</head>
and I am 100% sure that the path is correct and my file with HTML docs and my file with css documents are in the same hierarchy so I should not have an issue I believe.

I assume your file structure is like this based on what you said.
/webdevangela
/css
style.css
/html
*.html
So your link needs to go out of your html folder by using ../ and then into the css folder.
<link rel="stylesheet" type="text/css" href="../css/styles.css">

Related

Having problem with running my CSS on VS Code [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last year.
Improve this question
I am new to using vscode. I am trying to practice HTML and CSS. I was able to run my HTML but when I try to debug and run my CSS its not working. it says file can't be reached. Thanks
You have to link your css file like this:
<head>
<link rel="stylesheet" href="styles.css">
</head>
{You should post your code}
Remember to add this line in HTML
<style href='Your CSS file name'></style>
Or you can also use:
<link href='Your CSS file name'></link>

html and css wont link once placed in folder [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
my css and html linked just fine when they were just all on my desktop but once I placed them in folders for proper file structure all the images broke and the css no longer links I made sure all the href's were proper just none of the images or the css are working anymore.
<!DOCTYPE HTML5>
<meta charset="utf-8">
<head>
<title >Space Cube</title>
<meta charset="utf-8">
<link href="mart145final/css/index.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<img src="mart145final/images/space-cube.png" style="width:200px;height:100px;">
</header>
Try having the css folder and images folder inside the same location as the html file. Then, remove the "mart145final/" prefix from your link and image strings.
(Your html is currently saying "to find this image, go to the folder this html file is in, then go to mart145final and look for the css and images folder. I suspect the html file is inside your mart145final folder. In that case, just change the html references.)

My html page won't show my stylesheet [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
My html page doesn't show the edits that should be made with my css page. I have tried to fix the problem for over an hour now and done everything I can think of. The page is linked with
link href="stlyes/css-ba.css" type="text/css" rel="stylesheet"
Which i believe is correct. I've checked and rechecked the name and any other things. It is saved in the folder styles as css-ba.css.
Replace:
link href="stlyes/css-ba.css" type="text/css" rel="stylesheet"
With:
link href="styles/css-ba.css" type="text/css" rel="stylesheet"
You have a spelling mistake "stlyes"
check spellings for "styles" in href="stlyes/css-ba.css"
try deleting cache files and restart the browser

HTML/CSS Stylesheet won't work [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I'm probably missing something really obvious but why won't this code work?
<link type="stylesheet" href="css/main.css">
Basically, I'm trying to get a stylesheet that is called main.css in a folder called css.
I don't know why it won't work so please help me!
Probelm Solved
Wrong syntax:
<link rel="stylesheet" type="text/css" href="css/main.css" />
^^^ ^^^^
Note the attributes...
Please try this
<link href="style.css" rel="stylesheet" type="text/css"/>

Favicon not showing up sometimes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
I can not find a solution to my issue with the favicon. I have searched everywhere. I have a test site and the header is driven by php and inserts the same html header code on all the pages. I can confirm this just by looking at the source code of the pages in question. I have tried about all I know what to do
Here is my code in the html header. http://new.franmar.com/confirmation/980
<link rel='icon' href='/favicon.png' type='image/png'>
<link rel='shortcut icon' href='/favicon.png' type='image/png'>
<link rel="icon" type="image/ico" href="/favicon.ico" />
When I go to the home page (http://new.franmar.com/) I get the icon to show. And its the same code.
And ideas?
Thanks!
http://new.franmar.com/favicon.ico
You have a 404 error there. Where is this file located?