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

zizhao zhang
zizhao zhang
188 Points

WHAT DOES ! MEAN IN DOCTYPE?

WHAT DOES ! MEAN IN DOCTYPE?

index.html
<DOCTYPE HTML>

The '<!DOCTYPE>' declaration (Document Type Declaration or DTD) specifies the rules for the markup language so that the browsers render the content correctly.

It must always be the first thing in an HTML document, as it tells the web browser about what version of the markup language the page is written in.

Hope this helps!

1 Answer

When performing HTML validation testing on a web page it tells the HTML (HyperText Markup Language) validator which version of (X)HTML standard the web page coding is supposed to comply with. When you validate your web page the HTML validator checks the coding against the applicable standard then reports which portions of the coding do not pass HTML validation (are not compliant). It tells the browser how to render the page in standards compliant mode.

... and the exclamation mark itself is just something, that the w3c specified as something, that has to be in the declaration for HTML 5 documents ... and as far as I know, there is no "special meaning" behind the exclamation mark itself ... if that was your question ...

Hope this helps ... regards ... Jan.