HTML Tutorial · HTML Basics · Lesson 1 of 34

HTML Introduction

What HTML is, how browsers read it and what an element looks like.

What is HTML?

HTML (HyperText Markup Language) is the standard language for web pages. It describes the structure and meaning of content — this is a heading, this is a paragraph, this is a link — using elements written as tags.

A first page

Press Run to see how the browser renders it:

A complete HTML pageTry it yourself
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>My First Page</title>
</head>
<body>
  <h1>My First Heading</h1>
  <p>My first paragraph.</p>
</body>
</html>

Anatomy of an element

<p class="intro">Hello, world!</p>
  • <p> is the opening tag, </p> the closing tag.
  • class="intro" is an attribute that adds information.
  • Everything between the tags is the element's content.

Some elements are void (empty) and have no closing tag: <br>, <img>, <input>, <meta>.

Test yourself

What does HTML describe?

  1. How a page looks
  2. The structure and meaning of content
  3. How a page behaves
  4. The server configuration
Show answer

Answer: The structure and meaning of content