HTML โ€” Lesson 1

Introduction to HTML

What is HTML and how the web works.

By Majed Qandeel ยท Jul 26, 2026 ยท Lesson 1 of 25

What is HTML?

HTML (HyperText Markup Language) is the standard language for creating web pages. It describes the structure of a web page using a system of tags and attributes.

How the Web Works

When you visit a website, your browser sends a request to a server. The server responds with HTML code, which the browser interprets and displays as a visual page.

1
You type a URL
Browser sends request to server
2
Server responds
Returns HTML, CSS, JS files
3
Browser renders
Parses HTML and displays the page

Your First HTML Document

Every HTML document follows a basic structure:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Page</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is my first web page.</p>
</body>
</html>
  • <!DOCTYPE html> - Declares the document type and HTML version
  • <html> - The root element of the page
  • <head> - Contains meta information about the page
  • <title> - Sets the page title shown in the browser tab
  • <body> - Contains the visible content of the page

Common HTML Tags

TagDescriptionExample
<h1>-<h6>Headings (h1 is largest)<h1>Title</h1>
<p>Paragraph of text<p>Text here</p>
<a>Hyperlink to another page<a href="url">Link</a>
<img>Displays an image<img src="pic.jpg">
<ul>/<ol>Unordered/Ordered list<ul><li>Item</li></ul>
<div>Block-level container<div>Content</div>

HTML Tags

HTML tags are keywords surrounded by angle brackets: <tagname>. Most tags come in pairs - an opening tag and a closing tag with a forward slash.

<tagname>content goes here</tagname>
Tip: Click the Run button above to see the HTML code in action right here!
Note: HTML is not a programming language - it is a markup language that structures content. You'll add styling with CSS and interactivity with JavaScript later.

Try It Yourself

Open the Deoit Editor and paste the HTML above. Click Run to see your first web page in action!

Practice what you learned in the Deoit Editor โ€” a free, browser-based code editor.

Open Editor โ†’