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 trialStavros Sofroniadis
Courses Plus Student 1,503 PointsAbout Document Type Definition of an HTML document
Dear Friends,
it was mentioned in a video tutorial that DTD(Document Type Definition ) declare the edition of HTML we are writing.
If we mention <!DOCTYPE html> means we use HTML5 markup languagge and reality we use HTML4 tags or vice versa we mention <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
and reality we use HTML5 tags.
It will work properly the HTML file or not?
Thank You,
1 Answer
Jacob Jackson
UX Design Techdegree Student 7,833 PointsHey Stavros!
HTML5 is "backwards compatible" which means that the new syntax is compatible with the older forms of HTML.
So for example, if your site currently has the older XHTML way as you put: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> you can simply replace it with the HTML5 <!DOCTYPE html> and should be just fine :)
Such a good question!
-Jake