How to Create a Simple HTML Document

  • google plus

In Brief...

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.

Take our Introduction to HTML Training course for free.

See the Course Outline and Register

Instructions

  1. Open a simple text editor, such as Notepad, and create a new file. Do not use an HTML editor for this exercise.

  2. Save the file on your computer as HelloWorld.html.

  3. 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>
    

  4. 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 follows:
    Simple HTML Document

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, XML, Windows, Java, Adobe, HTML5, JavaScript, Angular, and much more. Check out our complete course catalog.

Categories

Courses

Author: Chris Minnick

Chris is a prolific author and trainer, and the CEO of WatzThis?. His published books include Writing Computer Code, JavaScript for Kids, Coding with JavaScript For Dummies, Beginning HTML5 and CSS3 For Dummies, Webkit For Dummies, CIW eCommerce Certification Bible, and New Riders' XHTML.

Discuss