Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Beginning HTML and CSS Introduction to HTML and the Portfolio Project

How do you tell your computer that your page is an html document

I don't know how to tell the computer my page is an html document

7 Answers

Stephen O'Connor
Stephen O'Connor
22,291 Points

Save it as an html file - file-name.html

Kate Hoferkamp
Kate Hoferkamp
5,205 Points

With the file extension .html

To let your computer or browser know that your file is written in HTML, you save the file with either the ".html" or the ".htm" extension.

You can also right click and "Open With" and use always so when you double click the .html file it will open in your browser.

Don't forget to add <!DOCTYPE html> and < html > before you start writing your code, so that the browser can recognise it. and then don't forget to end it with < /html > so that the browser knows where it ends.

When you want your computer to recognize a document as an html you must use the appropriate suffix (ex. htm, html). Later on this applies to CSS(.css) and Javascript (.js)

Every html document begins with <!DOCTYPE html> That is the beginning of an html document. No other coding programs have that only html has.