Login | Contact Us | Site Map | Resources

Introduction to HTML

Home > HTML Tutorial > How to Create An HTML File

How to Create An HTML File

HTML files must be identified as HTML files by the file extension with which they are named. There are two file extensions available for HTML files. The most commonly used and recommended extension is ".html", however ".htm" is also an option created back in the early days when some file systems limited file extensions to three letters.

I would not recommend the use of word processors (ie. Microsoft Word, StarOffice Writer, or Abiword) to save or create HTML files. Text editors such as Notepad or Wordpad on Windows machines, and Kwrite or Kate on Linux machines, are a better option. When saving the file, make sure that you type in the file name and the extension (example: index.html) and that if there is a "Save as Type" dropdown option on the Save menu, that the type is set to "All Files".

(See Example)

Websites have a default landing page called "index.html" or "index.htm'" that is used when no other specific page is requested. This page should always be your website's home page. If you type "http://www.yourwebsitename.com/" into your browser's address bar, for example, you will be sent "http://www.yourwebsitename.com/index.html" by default.

HTML files can be saved on your own computer and viewed from your browser, however unless they are hosted on a web server they will not be available to anyone else. If your HTML file is uploaded to a web server you can access it from the URL (example: http://www.yourwebsitename.com/index.html). If your HTML file is on your own computer you can open it by double-clicking the file or by going to "File > Open File" in your browser window.