Your first HTML docment
This tutorial focuses on creating an HTML document in:
- Windows
- Linux
If you need to review HTML basics before creating your first HTML document, visit our HTML basics lesson.
Windows
-
Open notepad by going to Start -> Programs -> Accessories -> Notepad OR go to Start -> Run - Type notepad and press Enter.
-
Type in the following code:
<html> <head> <title>My first page</title> <head> <body> <h1>My first HTML page!</h1> </body> </html>
-
Save the file as first firstdoc.html
NOTE: Make sure that you give the file a .html extension and that you save it as type 'All Files', otherwise you will get plain text.
-
Open your web browser.
-
Type into the web browsers location bar the absolute location of the directory where you saved the file along with the file name. For example, if you saved the file in C:\windows, type C:\windows\firstdoc.html into the web browsers location bar.
-
You should now see an HTML document in your web browser which looks like this:
Linux
-
Open nano by opening a console window, type 'nano' and press Enter.
-
Type in the following code:
<html> <head> <title>My first page</title> <head> <body> <h1>My first HTML page!</h1> </body> </html>
-
Save the file as first firstdoc.html
-
Type into the web browsers location bar the absolute location of the directory where you saved your file along with the file name. For example, if you saved the file in /home/user1/desktop, type /home/user1/desktop/firstdoc.html into the web browsers location bar.
-
You should now get the file in your web browser with the same output as the following:
My first HTML page
Screenshot for Linux coming soon..
Mac
Coming soon..
HTML Examples
View working examples created with HTML in our HTML examples section.
HTML exercises
Practice your HTML skills in our HTML exercises section.




