Main Tutorials

Html Tutorial Hello World

In this tutorial, you will learn how to create a simple hello world page with HTML. Firstly, let explains some of the HTML basics.

  1. HTML is stands for Hyper Text Markup Language
  2. HTML is a text file which consists a set of markup tags like (<html><body></html></body>).
  3. Almost all of the markup tag has start tag <html> and close tag </html>. Close tag is start with a “/”.
  4. The markup tags is just like a command to tell web browser (Firefox or Internet Explorer) what should do.
  5. HTML file must have htm or html as file extension.
  6. HTML file is not case sensitive. <html>, <HTML> or <hTmL> are all same tag.
  7. HTML file can be edit with any text editor like notepad or wordpad in windows , vi or emacs in unix or linux.

Steps to create HTML page

Let start to create a classic “Hello world” HTML file.

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

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
15 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
html5 tutorial
13 years ago

useful info. thanks..soon html5 will take over the web 🙂

Son-Goku
6 years ago
Reply to  html5 tutorial

It has.. 🙂

fjfgjf
6 years ago
Reply to  Son-Goku

i dont get dis

idk
6 years ago
Reply to  fjfgjf

same

Julia Davis
6 months ago

I went through your article which was on a webpage with HTML. I would like to add some easy points which are as follows:
1.Set Up Your Development Environment:
2.Create a New HTML File
3.Write the HTML Structure
4.Add Content
5.Save Your HTML File
6.Preview Your Webpage
7.Make Further Enhancements
These are some points which I wanted to include in your article. Readers, If you want to create your HTML website, you can visit an IT company like Alakmalak technologies. They have 17+ years of experience in this field.

BrokeDeveloper
4 years ago

Also you were supposed to put it on tags not exposed
Not like this

<html>
<head></head>
<body>
Hello World
</body>
</html>


But like this

<html>
<head></head>
<body>
<p>Hello, World!</p>
</body>
</html>


Whether it be a title or paragraph tag you are supposed to put it in tag…
Other wise.. why would it be called a markup language?
It’s main syntax is Mark Up..

Why
4 years ago

Why am i here

Dinesh Krishnan
6 years ago

Very good post thank you

fjfgjf
6 years ago

Hi

AG
10 years ago

A couple of errors:
* header -> head.
* #2 HTMP -> HTML

a d
3 years ago
Reply to  AG

just checking

ankit kumar pandey
4 years ago
Reply to  AG

website structure how to design and section how to start and manage

Abet
6 years ago

is it free to post a public webpage?

danielcj
3 years ago
Reply to  Abet

file:///C:/Users/danit/OneDrive/Documentos/daniel-estudio/hamsters/hamsters.htm

tititititi
5 years ago

tangina nyung lahat