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 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.