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.

HTML

What is this tag for and is it really that important?

<meta charset="utf 8">

What is this tag for and is it really that important? What would happen if I did not put this in my website?

<meta charset="utf 8">

Dave McFarland
Dave McFarland
Treehouse Teacher

Robert,

Your HTML code wasn't showing up correctly. I fixed it in your post.

For the future, to put HTML/CSS/JavaScript in a forum post:

  1. hit return to create a new line and type three back tick characters ```

  2. hit return to create another new line and paste your HTML

  3. hit return and add three more back tick characters: ``` The back tick character isn't the same as the single quote -- ' -- mark; the back tick is located on the same key as the ~ on most keyboards.

Also to add correct color highlighting add the name of the language after the back ticks like this: ```CSS. Here's what CSS should look like in a forum post:

#gallery li {
  float: left;
  width: 45%;
}

3 Answers

What tag are you asking about?

James Barnett
James Barnett
39,199 Points

<meta charset="utf 8">

This tag is for specifying the encoding of the text on a webpage. Without this tag, a browser may not know to switch to the proper encoding and characters may be displayed as gibberish.

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Also note that it's utf-8 not utf 8

<meta charset="utf-8">

The tag isn't strictly required, and you can set up your encoding scheme on your web server as it sends out its response headers.