On this page

What is HTML?

12 min read TextCh. 1 — HTML Fundamentals

What is HTML?

HTML (HyperText Markup Language) is the standard language for creating web pages. It is not a programming language, but a markup language that defines the structure and content of a web page.

Every web page you visit is built with HTML as its foundation. It is the skeleton on top of which styles (CSS) and interactivity (JavaScript) are applied.

Why learn HTML?

HTML is the mandatory first step for anyone who wants to pursue web development. Regardless of whether your goal is to:

  • Build websites
  • Develop web applications
  • Work in digital marketing
  • Design user interfaces

You will need to understand HTML.

The role of HTML in web development

Technology Function Analogy
HTML Structure The skeleton of a building
CSS Presentation The paint and decoration
JavaScript Behavior The electricity and plumbing

How does HTML work?

HTML uses tags to mark different types of content. Tags usually come in pairs: an opening tag and a closing tag.

<p>This is a paragraph</p>

Important: The browser reads HTML from top to bottom and renders elements in the order they appear. This is called the normal document flow.

Anatomy of an HTML element

A typical HTML element has:

  1. Opening tag: <p>
  2. Content: The text or inner elements
  3. Closing tag: </p>

Some elements are self-closing (void elements) such as <br>, <img>, and <input>.

Your first HTML document

Every HTML document follows a basic structure:

  • <!DOCTYPE html> — Declares it as an HTML5 document
  • <html> — The root element
  • <head> — Metadata (title, charset, viewport)
  • <body> — The visible content

Practice

  1. Create your first HTML file: Open a text editor, write a minimal HTML document with <!DOCTYPE html>, <html>, <head>, <title>, and <body>, then open it in your browser.
  2. Experiment with tags: Inside the <body>, add a heading <h1>, a paragraph <p>, and an unordered list <ul> with three <li> items. Observe how the browser renders them.

In the next lesson, we will learn the complete structure of an HTML document and each of its parts.

Did you know?
HTML was created by Tim Berners-Lee in 1991. Since then, it has evolved into HTML5, the current version that includes support for multimedia, graphics, and advanced APIs.
Prerequisites
You don't need any prior programming knowledge. Just a text editor (we recommend VS Code) and a modern web browser.
html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My first page</title>
</head>
<body>
  <h1>Hello world!</h1>
  <p>This is my first web page.</p>
</body>
</html>