How to Create a Simple HTML Document
In this exercise, you will create your first HTML document by simply copying the text shown below. The purpose is to give you some sense of the structure of an HTML document.
- Open a simple text editor, such as Notepad, and create a new file. Do not use an HTML editor for this exercise.
- Save the file on your computer as
- Type the following exactly as shown:
<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hello world!</title> </head> <body> <p> Hello world! </p> </body> </html>
- Save the file again and then open it in your browser
by navigating to the file in your folder system
and double-clicking on it. The page should appear as