Lesson 2: HTML Basics

⏱ ~25 min Lesson 2 of 10 💚 Free

HTML (HyperText Markup Language) is the skeleton of every web page. It uses tags to tell the browser what each piece of content is — a heading, a paragraph, a link, an image.

Key Concepts

Tags and Elements

An HTML tag looks like <p>. Most tags come in pairs: an opening tag <p> and a closing tag </p>. Everything between them is the element's content.

Common Tags

<h1> to <h6> are headings (h1 is biggest). <p> is a paragraph. <a href='...'> is a link. <img src='...'> is an image. <ul> and <li> make bullet lists.

Attributes

Attributes add extra information to a tag. <a href='https://okstem.org'> — href is the attribute that sets the link destination. <img src='photo.jpg' alt='A photo'> has two attributes.

🆕 Live Editor

Edit the code — the preview updates live!

HTML
PREVIEW

✅ Check Your Understanding

1. What does HTML stand for?

2. Which tag makes the biggest heading?

3. What is an attribute?

← Lesson 1Lesson 3 →