Home HTML What is HTML?

What is HTML?

Beginner ⏱ 5 min read Updated: Jul 2026
  • HTML stands for Hyper Text Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML consists of a series of elements
  • HTML elements tell the browser how to display the content
  • HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

A Simple HTML Document

Example
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
Result

My First Heading

My first paragraph.

Example Explained

<!DOCTYPE html>

Declares the document type and version of HTML being used. It must be at the very beginning of the document.

<html>

The root element of an HTML page. Every other element is a descendant of this element.

<head>

Contains meta-information about the HTML document — like its title, character set, and links to stylesheets.

<title>

Specifies a title for the HTML page — shown in the browser's title bar or tab.

<body>

Contains the visible page content — headings, paragraphs, images, links, tables, etc.

<h1>

Defines a large heading. HTML has six levels of headings from <h1> to <h6>.

<p>

Defines a paragraph. Browsers automatically add space before and after each paragraph.

What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

<tagname> Content goes here... </tagname>
Opening tag Element content Closing tag

Examples of some HTML elements:

Example
<h1>My First Heading</h1>
<p>My first paragraph.</p>
💡 Note: Some HTML elements have no content (like the <br> element). These are called empty elements. Empty elements do not have an end tag!

Web Browsers

The purpose of a web browser (Chrome, Firefox, Safari, Edge) is to read HTML documents and display them correctly. A browser does not display the HTML tags, but uses them to determine how to display the document.

🌐
How it works: When you type a URL in your browser, it sends a request to the server, which sends back an HTML file. The browser reads the HTML and renders the visual page you see.

HTML Page Structure

Below is a visualization of an HTML page structure:

<html>
<head>
<title> Page title </title>
<body>
<h1> Page heading </h1>
<p> paragraph </p>
<p> another paragraph </p>
Note: The content inside the <body> section will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab.