Tutelage

Lessons › coding and computer science · taught by Leo

HTML basics: build a web page

Learn how HTML tags, nesting, and attributes structure a simple web page.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app

HTML turns text into a page

HTML is the skeleton of a web page. It tells the browser what each piece is.

Think of it like labeling parts of a page: this is a title, this is a paragraph, this is a button.

Tags wrap content

Most HTML uses tags. A tag opens the element, and another tag closes it.

The browser reads the tags and decides how to display the content.

So HTML is less about looks, and more about structure.

Predict the tag pair

If you want a paragraph of text, which tag pair should wrap it?

  1. <p> ... </p>
  2. <h1> ... </h1>
  3. <button> ... </button>
Show answer

<p> ... </p>: Yes. Paragraph text goes inside p tags.

A basic page structure

Here is the basic idea. Each tag names a job on the page.

You can mix them to build one page from small parts.

Quick check: choose the title tag

Which tag usually makes the biggest heading on a page?

  1. <p>
  2. <h1>
  3. <div>
Show answer

<h1>: Correct. h1 is the main heading tag.

Why nesting works

Tags can be nested, which means one element sits inside another.

That works because the browser keeps track of the opening and closing tags.

If they match, the structure is clear.

Attributes add extra info

Some tags need extra details. Those are called attributes.

For example, a link can have a destination, and an image can have a source.

So the tag says what it is, and the attribute says more about it.

Predict the attribute job

What does an attribute usually do in HTML?

  1. Adds extra information
  2. Closes the browser
  3. Deletes the tag
Show answer

Adds extra information: Yes. Attributes add extra information to a tag.

A tiny HTML page

Put the pieces together and you get a simple page.

The browser reads the structure and displays it in order.

Your turn: pick the link tag

Which tag is used for a hyperlink?

  1. <a>
  2. <p>
  3. <h1>
Show answer

<a>: Correct. a is the link tag.

HTML memory checklist

Here is the checklist I want you to remember.

Use tags to name parts of the page.

Then nest elements and add attributes when needed.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app