Making Your First HTML Document


A simple text editor is all you need to create HTML pages


Step 1: Open Notepad (PC)

Windows 8 or later:

Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.

Windows 7 or earlier

Open Start > Programs > Accessories > Notepad


Step 1: Open TextEdit (Mac)

Open Finder > Applications > TextEdit

Also change some preferances to get the application to save files correctly. In Preferences > Format > choose "Plain text"

Then under "Open and Save", check the box that says "Display HTML files as HTML code instead of formatted text".

Then open a new document to place the code.


Step 2: Write some HTML

Write or copy the following HTML code into your text editor:


Step 3: Save the HTML Page

Save the file on your computer. Select File > Save as (or similar) in your text editors menu.

Name the file "index.html" and set the encoding UTF-8 (which is the preferred encoding for HTML files).


Step 4: View the HTML page in your browser

Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").
One the file is opened, it should look something like the image below.

My First HTML Document