After diligently following the courses on CodeAcademy (I know, kind of lame but it's a start), I finally feel confident in my ability to write my own HTML and CSS code. However, when I tried to do so using Sublime Text 3 and opened my HTML file, I noticed that the CSS was not being applied. Despite trying some code from CodeAcademy that had previously worked, Chrome kept displaying the plain HTML instead. Here is the code from my files:
template.html
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>Strut Your Stuff!</title>
</head>
<body>
<p>I'm about to become a lovely shade of teal.</p>
<p>Me, too!</p>
<p>I think I'll do the same.</p>
<div>
<p>We're going to become a truly striking scarlet!</p>
<p>I was thinking more vermillion.</p>
<p>No, crimson!</p>
</div>
</body>
</html>
and stylesheet.css
p{
color:#00E5EE;
}
div p{
color:#CC0000;
}
*{
border:1px dashed #3A5FCD;
}
Both files are located in the same directory. If anyone could provide some insight into what might be causing this issue, it would greatly help me out. Thanks in advance!
Update: I realized that simply reloading the page was not solving the problem. Instead, I had to open a new tab and manually enter the directory again.