Beginner15 min read

Introduction to HTML

Learn what HTML is, understand the concept of tags, and write your very first HTML elements.

What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. Every website you visit is built with HTML at its foundation.

HTML is not a programming language — it is a markup language. That means it uses a system of tags to describe the structure and meaning of content. Think of HTML as the skeleton of a web page: it defines what each piece of content is (a heading, a paragraph, an image, a link) rather than how it looks.

Understanding Tags

HTML tags are keywords surrounded by angle brackets. Most tags come in pairs: an opening tag and a closing tag. The closing tag has a forward slash before the keyword.

  • Opening tag: <tagname>
  • Closing tag: </tagname>

Everything between the opening and closing tags is called the content of that element. Together, the opening tag, content, and closing tag form an HTML element.

For example, a paragraph element looks like this:

<p>This is a paragraph.</p>

Some tags are self-closing, meaning they do not need a separate closing tag. You will encounter these later.

Basic HTML Syntax

html
<!-- This is an HTML comment -->

<!-- A heading element -->
<h1>Welcome to My Page</h1>

<!-- A paragraph element -->
<p>This is my first paragraph of text.</p>

<!-- Another paragraph -->
<p>HTML is straightforward once you understand tags.</p>

What does HTML stand for?

Ready to practice?

Create your free account to access the interactive code editor, run challenges, and track your progress.