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

DOCTYPE question

I am working on a PHP tutorial that uses the following DOCTYPE in a template.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I'm guessing this DOCTYPE is for HTML 4? Should you declare a version with your DOCTYPE? My final question is there documentation on changes in HTML from version to version.

1 Answer

Hi Brian Abbott,

With HTML5 being pretty much standard, with new HTML tags and such, it's recommended you use HTML5 doctype, which is very easy to remember:

<!DOCTYPE html>

Start using this and you'll be okay. The majority of frameworks for front end will use HTML5 doctype, as they make use of features like flexbox, semantic elements (nav, aside, main etc).

Any questions let me know!

Good luck, Ash