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 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.