The issue I am having is in CodeSanbox.io. Below you will see the code for my HTML file (index.html), as well as the code for my linked CSS file (styles.css), which is in a folder titled css.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./css/styles.css" />
<title>Test project</title>
<meta charset=UTF-8" />
</head>
<body>
<h1>Hello</h1>
<div></div>
</body>
</html>
CSS Code:
div {
width: 20px; height: 200px; background-color: blue; opacity: 50%;
}
body {
background-color: red;
}
When I view the CSS file, the contents of both the HTML and CSS file are shown. When I view the HTML file, only the contents of the HTML file are shown.