Linking the CSS file to my HTML file doesn't work no matter what I do
Nils
I'm trying to link to CSS files in my HTML index file. It's just one line of code and obviously nothing I try will work. I am using VSCode.
- If I enter the link from scratch, it also autocompletes (or displays it anyway). So it knows it's there.
- I also tried moving the CSS files out of the folder and placing them next to the HTML files. But that doesn't work either.
- I tried styling brackets in the HTML file itself, and the coloring there works.
So the way I test it is that nothing shows up in blue.
I also removed my Javascript from the HTML file into a separate file that I linked to to improve the readability of this question and it did work
Does anyone else have any ideas?
I've also seen other threads for the same issue, but it doesn't show anything new to try.
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<meta charset="UTF-8">
<link rel=”stylesheet” type="text/css" href="styles/style.css">
</head>
<body>
<a id="stringCalculation"></a><br>
<a id="stringResult"></a>
<br>
<div id="container-numbers">
<button id="one" class="number">1</button>
<button id="two" class="number">2</button>
<button id="three" class="number">3</button>
<button id="four" class="number">4</button>
<button id="five" class="number">5</button>
<button id="six" class="number">6</button>
<button id="seven" class="number">7</button>
<button id="eight" class="number">8</button>
<button id="nine" class="number">9</button>
<button id="zero" class="number">0</button>
</div>
<div id="operators">
<button id="symbolPlus" class="operator">+</button>
<button id="symbolMinus" class="operator">-</button>
<button id="symbolTimes" class="operator">*</button>
<button id="symbolDivid" class="operator">/</button>
<button id="equals">=</button>
</div>
<div id="other">
<button id="clearButton">Clear</button><br>
<button id="backspace">Backsp</button>
<button id="decimal">.</button>
</div>
<script src="javascript/myscript.js"></script>
</body>
</html>
and CSS file:
#one {
background-color: blue;
}
.number {
background-color: blue;
}
Here is my folder:
in:
Ashish Mishra
change this
<link rel=”stylesheet” type="text/css" href="styles/style.css">
and
<link rel="stylesheet" type="text/css" href="styles/style.css">