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!
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
Matt Cornett115 Points
When Creating code for a website, how do you tell the computer that your page is an html document
how do i tell the computer that my document is an html document
Jason Baxter2,602 Points
Adding <!DOCTYPE html> at the beginning of the document as well as saving with a .html extension should do it. Can you describe the issue you are running into in more detail?
Wayne Priestley19,579 Points
As Marcel has said, all the computer reads is the file extension to know what type of document it is, so .html will do it.
An example of this would be:
black.html black.png black.pdf black.doc
All of the above have the same name but with a different file extension, the computer does not look inside to know the type of file it is, it relies on the extension you have given it. Change the extension on one of your files and watch your computer try to open it in a different application because it thinks its now a different type of file.