HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.
Originally, HTML was developed with the intent of defining the structure of documents like headings, paragraphs, lists, and so forth to facilitate the sharing of information between researchers.
Now, HTML is used to create web pages and to display the written portions correctly. It uses various tags that help the page look beautiful and look its best.
Basic HTML Document
In its simplest form, the following is an example of an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is my first HTML web page. I am learning HTML!</p>
</body>
</html>
Either you can use Try it option available at the top right corner of the code box to check the result of this HTML code, or let’s save it in an HTML file basichtml.htm using your favorite text editor. Finally open it using a web browser like Internet Explorer or Google Chrome, or Firefox etc. It must show the following output.

Line-by-Line Explanation
1. <!DOCTYPE html>
This indicates that the document is written in the HTML5 version. It instructs the browser to render the page according to HTML5 rules. This means which version of HTML is this?
2. <html>
This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>โฆ</head> and document body which is represented by <body>โฆ</body>tags.
3. <head>
This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.
4. <title>
The <title> tag is used inside the <head> tag to mention the document title.
5. <body>
This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.
6. <h1>
This tag represents the heading.
7. <p>
This tag represents a paragraph.
To learn HTML, you need to study the various tags and understand how they work when formatting a text document. And how to write them, just remember what you saw above.