2

after a few hours of searching through the forums and trying things, I've got the code:

<html>
<head>
    <title>Tester123</title>
    <link href="style1.css" rel="stylesheet" type=“text/css” />
</head>
<body>
    <h1> What the what? </h1>
    <p>This is a paragraph. Hooray!</p>
    <div class="trial">What text is this?</div>
    <p>Oh hello. The CSS thing is frustrating hey?</p>
</body>
</html>

And I'm trying to get the CSS to load in Chrome (from a mac). I've got the css (style1.css) and this file in the same folder (all just loading from my computer), I've cleared the cache, I don't see anything loading in the Chrome Inspector (Sources) about the CSS and I'm stuck for any ideas. I opened up the source and it seems to link through great there. I have quadruple checked file names and types, but I have nothing. Thoughts?

pwdrysdale
  • 31
  • 1
  • 4
  • How do you know that the file is not loaded? Do you get any errors? Maybe your class `trial` is not correctly defined. Post the content of the css file. – pagep Dec 04 '16 at 01:38
  • yes it's the quotes in type attribute . however you can delete type attribute since html5 default value for style sheet is css so no need for it. – Yahya Essam Dec 04 '16 at 01:41

1 Answers1

5

The type attribute in your link tag has typographical quote characters: type=“text/css”. Try to change these to "plain" quotes like type="text/css"

Johannes
  • 64,305
  • 18
  • 73
  • 130