1. Text Editor

Open your favorite text editor, e.g Notepad. Create an empty text file.

2. HTMP Code

Copy and paste the following HTML code into your newly open text file.

   <html>  <header><title>This is title</title></header>  <body>  Hello world  </body>  </html>  
Copy
html-tutorial-hello-world-notepad

3. Save It

Click File, Save it with a HTML file extension, e.g “anynameyoulike.html”

html-tutorial-hello-world-save-as

4. Demo

Double click to view it. (Or open the newly saved HTML file with your favor Internet browser).

html-tutorial-hello-world-view-it

Explanation of code

  1. <html></html> tag is tell internet browser this file is a start and end of the HTML file document.
  2. Text between <header></header> tag is for HTML header information, which is not display in internet browser.
  3. Text between <title></title> will display in left-up corner in internet browser, it’s web page title.
  4. Text between <body></body> will display as content in internet browser.