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

HTML How to Make a Website HTML First Use HTML Elements

Hello, I thought I had identified my html doctype tag, but I'm missing something here. Help!

I know I'm just telling browser format of webpage and types of characters used, but I thought I had identified it here.

index.html
<head>
<meta charset "utf-8> 
</head>
<meta charset="utf-8">

Roman, I edited your post to fix the code display. Make sure you wrap you code in (```) at the beginning and end without the parenthesis for proper display, if you need more information check out the Markdown Cheatsheet, it's very helpful in using Markdown to post on the forum.

3 Answers

You're close, but you are forgetting to actually declare the DOCTYPE at the top of your HTML and your charset has some minor typos (missing equals sign and missing closing quotation). Proper HTML5 DOCTYPE is as follows:

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</html>

Note that lang and charset could potentially change depending on your needs.

Hi Cyde, the way to identify an HTML Doctype is by using the following line of code:

<!DOCTYPE html>.

Also, in your <meta> tag you need to include an = sign after charset as well as enclose the utf-8 in "". So it should look like

<meta charset="utf-8">

I hope this helps.

huckleberry
huckleberry
14,636 Points

Hey there Clyde,

First you have to declare your doctype with the doctype tag. Since you don't actually have it there I'll just have to give it to you lol...

<!DOCTYPE html>

As for what you DO have there, you have a couple of easy to make syntax errors there is all :)

First, your tag is the meta tag right and the charset is an attribute of the meta tag. Well, you gotta remember that nearly 100% of all attributes get a value. The value in this case is the utf-8, right?

Well, to give a value to an attribute you must include the = sign. It's also known as an "assignment operator". Remember that term now and forever. Amen.

So, you're assigning a value to that attribute so you have to use the assignment operator which is the = sign.

After that you need to remember that values of attributes are always enclosed in quotation marks. You started off good with one double quote mark but you forgot the most crucial part. The closing quote mark.

So...

attribute needs to be assigned a value using the assignment operator which is just a fancy schmancy term for the equal sign. and the value has to be enclosed by the quotes.

Now, what should your code look like?