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

JavaScript Introduction to Programming Control Structures Loops

Jeff Martinez
Jeff Martinez
1,826 Points

Character encoding HTML not declared

I get an error of "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range."

How do I fix this?

2 Answers

Michael Hulet
Michael Hulet
47,911 Points

In order to fix this, add the following tag to the top of the head of your HTML document:

    <meta charset="utf-8"/>
    <!-- The rest of your page's header here -->

This will define the page's character set to be the latest version of Unicode, which is the most widely used and supported character encoding in the world