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 trialJason Brown
284 PointsCharacter set tag
I can remember what goes between meta and charset?
3 Answers
Richmond Lauman
28,793 Pointscharset is an attribute and not a tag, so I am unsure what you are asking. Are you referring to a meta tag with a charset attribute like the one below?
<meta charset="UTF-8">
Jason Brown
284 PointsThat's what I inserted? I must have had a space in the wrong place..Thanks!
Richmond Lauman
28,793 PointsGlad to help.
James Barnett
39,199 PointsIf you are using this doctype
for HTML5
<!DOCTYPE html>
Then use this meta
element
<meta charset="utf-8">
If you are using the doctype
for HTML4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Then use this meta
element:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">