I've been attempting to connect a CSS file to my HTML index file, but I can't seem to get it to work no matter what I try. I'm using VSCode.
- When typing the link from scratch, it auto-completes or shows up, indicating that it recognizes it.
- I've experimented with moving the CSS file out of the folder and next to the HTML file, but that didn't solve the issue either.
- Adding style brackets directly in the HTML file resulted in proper coloring, so it seems like everything is set up correctly.
During testing, nothing appears in blue as expected.
To enhance readability for this question, I moved my JavaScript code into a separate file which did work successfully.
If anyone has any suggestions or ideas, please share as I haven't found any new solutions in other related discussions.
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<meta charset="UTF-8">
<link rel=”stylesheet” type="text/css" href="styles/style.css">
</head>
<body>
// HTML content goes here
<script src="javascript/myscript.js"></script>
</body>
</html>
And here's the CSS file:
#one {
background-color: blue;
}
.number {
background-color: blue;
}
This is my current folder structure:
https://i.stack.imgur.com/N5F2W.png
And this is the contents: