Academy · Beginner · 10 min
HTML basics: build your first web page
Learn the structure of a web page: headings, paragraphs, lists and links, with a live example.
HTML (HyperText Markup Language) describes the content of a web page. Every page is made of elements: a start tag, some content and an end tag.
The building blocks
<h1>A main heading</h1>
<p>A paragraph of text.</p>
<ul>
<li>First item</li>
<li>Second item</li>
</ul>
<a href="https://example.com">A link</a>
<img src="photo.jpg" alt="Describe the picture">
Key ideas
- Use one
<h1>per page for the main title, then<h2>and<h3>for sections. - Always give images an
altdescription. It helps blind users and search engines. - Use lists for lists and links for links. Meaningful tags make pages accessible.
Try it
Open the playground, change the heading and the list items, and watch the preview.
Common mistakes and practice
- Forgetting an end tag, such as a
</p>or</li>. The browser guesses, and the layout can break in surprising ways. - Using a heading only to make text bigger. Choose headings for structure and use CSS for size.
- Skipping the
alttext on images, or writing "image" instead of describing what the picture shows.
Practice: Build a one-page profile: an <h1> with your name, a short paragraph, a list of three interests and a link to a site you like. Then check it with a screen reader or by turning images off.