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

<!DOCTYPE html> <html> <head> <meta charsest="utf-8"> <title></title> </head> <body> </body> </html>

Am I wrong or is it just the page which doesn't work

index.html
 <!doctype html>
<html>
<head>   <tittle> </tittle>
   <meta charset="utf-8">
   </head>
  <body></body>
</html>

3 Answers

Steven Parker
Steven Parker
231,248 Points

It looks like you have two attempts at the answer, one outside a code block and one inside. You just have a little typo in each one.

:point_right: In the first, "charset" should only have one "s".

:point_right: In the second, the word "title" should only have 2 "t"s.

alastair cooper
alastair cooper
30,617 Points

type doctype as

<!DOCTYPE html>

thanks

Kristopher Van Sant
Kristopher Van Sant
Courses Plus Student 18,830 Points

Hey Alastair! Don't forget to add back-ticks, ```, before and after any code snippets you add in your post. Otherwise the code won't show up. I went ahead and added them here for you. :) You can also use the preview eye in the lower right corner of the post box to preview your post and make sure it looks how you'd like it to before you actually post it.

That doesn't matter right, if its uppercase or lower-case <!DOCTYPE html>?

Kristopher Van Sant
Kristopher Van Sant
Courses Plus Student 18,830 Points

Hey Klaas, you're correct. The DOCTYPE is case-insensitive. So it can be lowercase as well. However, it's best practice to have it in uppercase. From what I've seen elsewhere there may be some weird and rare quirks with old IE browsers if you use a lowercase doctype. And it may affect serving XML, which (from what I've read) requires it to be uppercase if you use it.

Here's a few resources about it if anyone is interested.

https://www.w3.org/TR/html5/syntax.html#the-doctype

http://stackoverflow.com/questions/7020961/uppercase-or-lowercase-doctype/9109157#9109157

https://www.codecademy.com/forum_questions/5600c270d3292fc5e10000c9

https://mathiasbynens.be/notes/xhtml5#doctype

alastair cooper
alastair cooper
30,617 Points

tittle should be title doctype should be !DOCTYPE