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 trialChristopher Ponce
2,766 PointsIm adding a charset attribute but is not recognizing it
is there any way to type a code here because it doesn't display what i want
8 Answers
Christopher Ponce
2,766 Pointsomg im such a noob, the problem was a space before the = thanks for the help everyone !!
Damon Johnson
Courses Plus Student 2,775 PointsHaha its a learning curve. And at least you now know how to post code to the forum
Every cloud has a silver lining =)
Damon Johnson
Courses Plus Student 2,775 PointsHey Christopher,
That's known as a document type and lets your browser know what version of HTML the webpage is written in.
You need a charset:
<meta charset="utf-8">
This lets the browser know what character set to use. =)
Isaac Asante
4,752 PointsHey Christopher, the charset
attribute should be in the <head></head>
section of your webpage. The charset
attribute should also be added within a meta
tag, exactly like this: <meta charset="UTF-8">
Keep in mind that the charset attribute DOES NOT change the layout of your webpage. The charset attribute only specifies the character encoding for the HTML document.
Christopher Ponce
2,766 Pointsthats what im typing on the challenge but it doesn't recognize it
Damon Johnson
Courses Plus Student 2,775 PointsHere is my code which works fine:
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
=)
Isaac Asante
4,752 PointsYour code at this part of the Code Challenge should be:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
Christopher Ponce
2,766 Pointshow can i post a screenshot? but i don't think the code that you posted is not different from what im going to post.
Damon Johnson
Courses Plus Student 2,775 PointsYou need to surround your code with these ```
If you cant find it on your keyboard, you can copy and paste is above and below your code, and this will wrap it to display like this
html
Christopher Ponce
2,766 Points<!Doctype html>
<html>
<head>
<meta charset ="utf-8">
</head>
<body>
</body>
</html>
Christopher Ponce
2,766 Pointsis there something wrong with my code?? or its a browser compatibility problem ??
Damon Johnson
Courses Plus Student 2,775 PointsHey Chris,
They arent double quotation marks, they are the back quote key. Mine is located on the keyboard key with three symbols although yours could be different.
Try to copy my three ``` and past them into your post =)
Christopher Ponce
2,766 Pointshahaha yeah thanks!!
Eric Dietrich
Courses Plus Student 5,897 PointsNice job debugging your own code! That is a major skill to learn. As I have gone through the courses, I have learned that my problems aren't caused by not understanding the concept, but mistyping the code OR not understanding the syntax. Happy Coding!
Christopher Ponce
2,766 Pointsfor me it's vice versa I'm very good with the syntax but it's kinda hard for me to understand the concepts. hey but thanks!! :D
Damon Johnson
Courses Plus Student 2,775 PointsDamon Johnson
Courses Plus Student 2,775 PointsHey Christopher,
I'm afraid your code doesn't display, can you re-post it?