HTML Hello World – How to write HTML code

The full form of HTML is “Hyper Text Markup Language”. HTML codes are very easy to write and understand. Whenever a new student learns to write HTML code, then in this tutorial we will learn about what he should know first. In this tutorial we will learn how to write HTML code. HTML Hello World.

Many people also call HTML a programming language but HTML is not a programming language at all. It is a markup language that tells the browser how to describe the structure of the webpage. 

Just as we make the design or architecture of the house on a page before building a house, so that we get to know what the structure of the house will be. In the same way, the work of HTML is to create structure.

In this tutorial we will learn about all these. This tutorial is a very interesting tutorial because basic knowledge has been given along with examples in it. It is always our endeavor to explain the tutorial in easy language and explain it with example because unless we see the example, we do not understand anything.

HTML Hello World – What is HTML programming language?

Whenever we learn HTML, before that we have probably learned some programming language like C , C ++, so whenever we start to learn HTML , we think that HTML will also be a programming language but it is not so. Let us know why HTML is not a programming language? Why HTML is not a programming language?

Programming language means that computer language that does the work of doing any logic or calculation. HTML does not do any logic or calculation work, which means that we cannot make mathematical equations with this. It only works to tell the browser which part of a webpage will be heading and which part will be paragraph etc.

HTML does not have any kind of functions like if / else, 5 + 5 etc. It is a markup language and its job is to mark the area in the webpage.

What can’t you do in HTML?

  • In this you cannot define variables.
  • In this you cannot do any kind of mathematical calculation.
  • In this you cannot define any type of function.
  • It does not take any kind of input.
  • It does not handle any type of events like mouse click, keyboard button press, etc.

This is the reason that does not make HTML a programming language.

HTML First Document – Hello World in HTML

Whenever we learn any computer language, first of all we see Hello or Hello World or print our name in it. So now we will try to know how to write code in HTML and how to run it. Will try to know its structure also.

To write HTML code, people use professional text editors such as Sublime, Net-beans, etc. Because all these text editors have a lot of short functionality, so that the code can be written quickly, but if you are a new learner then I would advise you that you should never use a professional text editor because it You will not be able to learn anything.

A pre-installed text editor is provided by every operating system, which is very simple, you can use it. Apart from this, you can also use online html editor. Online HTML Editor

Steps to write HTML code:

Step 1: (For Windows Operating System)

  • First of all open Notepad. For this click on the start button and search Notepad. Or type notepad by pressing Windows + R and press enter.

Step 1: (For Mac Users)

  • First of all open TextEdit, for this click Finder >> Applications >> TextEdit .
  • In order to save HTML files correctly, you will have to change the setting. For this select Preferences >> Format >> Plain Text .

Step 2:

  • Now after that write some HTML code in your text editor or copy paste the HTML code given below.
<!DOCTYPE html>

<h1>Hello World</h1>

<p>First HTML Document.</p>

HTML Code Example

Step 3:

  • After that save the code. While saving, give the extension .htm or .html of the file, only then the browser will be able to interpret it.
Save HTML Document

Step 4:

  • Now open that HTML page in any browser of the system. Double click to open or you can right-click and open it in browser with Open with option.
  • Now the result of your HTML file will be something like this.
HTML Result

HTML Page structure

HTML Basic Structure
  • The <head>..</head> tag contains content that is not shown on the page, such as <title>…</title>
  • The <body>…</body> tag contains all the contents that are shown on the page such as <h1>…</h1>

Can I create a webpage with only HTML?

There is a question in the mind of many people that can we create a webpage with the help of HTML only? The answer is yes you can create a webpage only with HTML but its design will not be good. Just as a house does not look beautiful without decoration, similarly a webpage will not look beautiful without CSS and JavaScript.

Leave a Reply

Your email address will not be published. Required fields are marked *