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

Beth Barrett
Beth Barrett
1,412 Points

Adding a charset attribute, why this isn't working:

Set the character set for the attribute...not sure why this isn't working. <!DOCTYPE html> <html> <head> <meta charset = "utf-8"> </head> <body> </body> </html>

index.html
<!DOCTYPE html>
<html>
 <head>
   <meta charset = "utf-8">
  </head>
  <body>
  </body>
</html> 

3 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Beth,

You are close, but you can't have any spaces before or after the equal sign.

<meta charset="utf-8">

Keep Coding! :)

rydavim
rydavim
18,814 Points

Welcome to Treehouse!

You've gotta' be careful with white space in computer languages. When setting your charset, you need to not have any space within the assignment. Other than that, you code looks good, nice job!

<meta charset="utf-8">
Beth Barrett
Beth Barrett
1,412 Points

That's one I'll never forget (blush). Thank you !

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Happy to help.

That's one that catches me more than a few times too. Especially if you're bouncing between a couple programming languages. JavaScript doesn't really care about whitespace... but HTML and CSS...

I hope you enjoy your experience and learning here on Treehouse. :)