Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

Naivedya Bansal
Naivedya Bansal
5,483 Points

<meta charset="utf-8"> what does this do?

Kinda forgot where this was mentioned earlier.!

2 Answers

Hi,

This sets the character set for the document.

You can find more info on that over on w3schools.

Hope that helps :)

-Rich

Cristian Altin
Cristian Altin
12,165 Points

It's important for internationalisation. It tells what character set to expect from your content within the page.

For example these letters used in european languages could not be found in an old ASCII character set: èéòàù (the one up to 127, not the one up to 255).

Different languages have many characters that are not part of the ASCII character set or other sets used later on but the UTC-8 is today's best bet since according to wikipedia "82.4% of all Web pages in January 2015" use it and it covers almost all languages.