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?

2
  • 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. Commented Dec 4, 2016 at 1: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. Commented Dec 4, 2016 at 1:41

1 Answer 1

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"

Sign up to request clarification or add additional context in comments.

2 Comments

Done! I knew it would be something simple! Thank you very much!!
I suggest you use a decent HTML editor. Unexpected characters are easily resolved through a quick visual on syntax coloration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.