Ad space (banner)
🎨HTML & CSS Lessons
Lesson 2 / 50

Your First HTML

In this lesson you'll learn the basic structure of HTML tags so you can build a text page using headings and paragraphs. This is for people searching "HTML basics how to write" or "HTML tags for beginners."

HTML is a language that gives meaning to text using "tags." A tag comes as a set of three parts — an opening tag, content, and a closing tag — where <h1> represents a heading and <p> represents a paragraph. The browser reads these tags and automatically formats things like text size and line spacing for display. There are many kinds of tags, but if you just remember these two — "heading" and "paragraph" — you can immediately build a simple text page.

The sample code creates a large heading with <h1> and two paragraphs with <p>. Rewrite the code and press "Run" to see the page preview below — practice by checking how the appearance changes each time you change a tag.

A common beginner stumbling block is forgetting the closing tag (the one with a slash, like </h1>). Forgetting it can cause even the text that follows to display in an unintended way. Remember the rule: opening and closing tags must always be written as a pair.

Even in real web development, HTML is the first thing built — the "skeleton" of a page. No matter how flashy a site's design looks, at its foundation is a stack of these simple tags.

HTML & CSS
OUTPUT

💡 The preview runs entirely on this page — nothing is sent externally.

Ad space (banner)
Ad space (in-article)