Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website HTML First Use HTML Elements

John Meredith
John Meredith
4,962 Points

why isn't code working

<!DOCTYPE HTML> <html> <head> <meta charset=”utf-8”> <title>John | designer</title> </head> <body> <h1>John</h1> </body> </html>

say meta charset is wrong

index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset=”utf-8”>
<title>John | designer</title>
</head>
<body>
<h1>John</h1>
</body>
</html>

2 Answers

Samuel Webb
Samuel Webb
25,370 Points

There's an issue with your quotation marks. They look different than mine do so they must be registering as different keys or something. I'll show you the way they both look and you'll be able to see the difference. Copy/paste my meta line into your code and it'll work fine. Don't worry, your code was correct.

<meta charset="utf-8"> 
<meta charset=”utf-8”> 

The top line is mine and the bottom line is yours.

John Meredith
John Meredith
4,962 Points

I retyped quotes and now it works thanks not sure what happened.

Samuel Webb
Samuel Webb
25,370 Points

No problem. Glad to help.

Colin Bell
Colin Bell
29,679 Points

Did you happen to copy and paste the original code from Word (or another type of word processor) instead of a text editor? Word automatically changes the standard double quotation to a smart quote. It makes it more legible for people, but isn't recognized as a quote by the HTML tokenizer.