How To: Create a HTML File

No doubt, the first question that comes to somebody's mind when they begin with the idea of creating a website, or even a HTML page, is where to begin. Specifically, how does someone even create a HTML page to begin with? There isn't exactly a button on your computer to start one. There isn't a pre-installed HTML page creator, at least not on most machines. Thankfully, this is relatively easy to accomplish, even with limited understanding on technology.

One of the most direct ways to create a HTML page is to create a simple TXT page, and then change its extension. Create just any TXT page however you'd like. This can involve going into a text editor and then saving it, or it can involve a shortcut (or right click) on the computer desktop and selecting an option to create a TXT file. A TXT file is preferred because a HTML page is really just a TXT file that gets read differently; not everything on the file is normally displayed. Once the file has been created, go to where it is located and change its name. However, rather than just changing the normal part of the name, you want to be looking for the .txt ending after the file title. That needs to be changed to .html instead. Once done, the page will open up into a webpage with the code being interpreted as HTML. The biggest hurdle to this method is being able to change the extension on the file, though. Some operating systems may not allow it, or may have the option hidden, and freely changing file extensions are a surefire way to ruin a file, if you don't know what you are doing.

The next most direct way is to use a program which generates and can save files as HTML files directly. Some text editors have this function, which will allow you to save a file directly as a HTML file rather than TXT or some other format. There are programs designed specifically to create and edit HTML webpages, which can perform this task without needing to figure out how exactly to get your text editor to do so. The disadvantage here is that it requires knowing where those settings are in your text editor of choice, possibly forcing you to use another one, or requires you to have the HTML editor program.

And last, one common way to create web pages exists within the tools provided by some website hosts. Some hosts, along with providing a place to put the webpage online and a way to upload those files, will provide a way to generate HTML webpages on their hosting. That is, they'll have a tool that will generate a blank HTML page on their server, and allow you to freely edit the page. The disadvantage of this, of course, is that you would need to be accessing the website host while doing any edits, which requires both the internet connection and the access any time you which to review or edit your webpages.

Regardless of how you produce a HTML file, the methods of opening it and viewing it are the same. Opening a HTML file in an internet browser will display it as a HTML file, showing how it appears on the internet through other browsers. Opening the HTML file in a text editor will display the raw text data, in other words, the whole HTML code. Opening in a HTML editor will generally show the code, although many can also allow you to view how the HTML file appears through a web browser.