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 do you do a HTML doctype.

can you teach me how to do a html doctype?

index.html

2 Answers

stating a Doctype is simple as typing the code below as your very first line (!DOCTYPE html). and the remaining information goes in the between the html tags.

<!DOCTYPE html>
 <html>

        <head>
     <!--Head Description such as meta tags, stylesheets, title goes in here--!>
        </head>

       <body> 
      <!--Main Content that gets displayed in your browser hangs out here--!>
       </body>

</html>
Gunhoo Yoon
Gunhoo Yoon
5,027 Points

Actually, this can be seen many times in your first HTML track.

<!DOCTYPE html>

What this does is telling our browser the type of document we are using.