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

How to write an HTML doctype

index.html
html:

4 Answers

Hey Kyle

For HTML 5 it is simply (should be at the beginning of your HTML document):

<!DOCTYPE html>

ok cool,thanks.

Don't forget to put <html> directly under the type and end the page with </html>

Fernando Carlini
Fernando Carlini
6,349 Points

<!DOCTYPE html> --> this declaration donΒ΄t have an closing tag as others. It must be at the top of the document.

Paula Mourad
Paula Mourad
5,154 Points

Hello Kyle! It's very simple:

          <!DOCTYPE html>
          <html>
          <!-- Here you start with your head, then body elements-->
          </html>
          ```