Table of Contents
Learn HTML
Learn HTML easily by following step-by-step tutorials and Practice yourself using our Try It code runner.
What is HTML?
HTML stands for Hyper Text Markup Language. It is a markup language that is used to create web pages. For example, the page you are reading now is created using HTML.
It has some instructions that tell the browser how to display the contents. These instructions are called tags.
A simple HTML document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Hello World!</h1>
<p>This is my first web page</p>
</body>
</html>
HTML Document Explanation
- The declaration of
<!DOCTYPE html>
defines the document as an HTML5 document - The
<html>
tag is the root of the HTML page - The
<head>
tag contains meta information for the page. - The
<title>
tag is used to define the title of the page. - The
<body>
tag is used to define the body of the page and it contains all visible contents. For example, heading, paragraph, input fields, etc. - The
<h1>
tag is used to define a large heading. Click to Learn more about heading tags - The paragraph tag is used for a paragraph.
What is an HTML element?
An HTML starting tag, its contents and an ending tag are called an HTML element together. For example:
<p> This is my first web page </p>
is an element.
The format of a starting tag is <tagname>
and the format of an ending tag is </tagname>
Note: Some tags don’t have an ending tag. For example <br>
, <img>
etc.
The basic structure of an HTML webpage
What is an HTML editor?
An HTML editor is a simple text editor. You can use any Text Editor to learn HTML code. Learn more about HTML Editors.
What is a web browser?
A web browser is a type of software that can run and view an HTML document correctly. For example Chrome, Safari, Edge, Firefox etc. It can run HTML webpages from the internet and from the local machine.
You can learn HTML by Editing HTML codes in a Text Editor and viewing the HTML page on a Web Browser.
Here are different browsers:
Note: Follow our step-by-step tutorials to Learn HTML easily. And practice regularly using our Try It.
How to use the “Try it” editor?
Just click here to go to Try It editor.
Write your HTML code in the editor and click on the “Run” button. You will see the output of your written HTML code on the right side (On Desktop or Laptop) or on under the editor (On Mobile Devices).