Home · Academy · Robotics & Coding · Web Fundamentals · Page Skeleton with HTML

Page Skeleton with HTML

Learn to build a page skeleton with HTML tags: headings, paragraphs, lists, links and images.

LESSON COMPASS

What will you use this page for?

Core idea

HTML is the markup language that uses tags to define the headings, paragraphs, lists, links and images of a web page.

Evidence to produce

Complete the page task with your own input, test conditions and reasoning.

Control trap

Forgetting the closing tag If you write <p> but forget </p> , the following content may stay inside the paragraph. Make it a habit to close every tag you open. Leaving the alt text empty Not writing alt when adding an <img> is a common mistake. Write a short text that describes the image in a meaningful way. Using…

Next connection

Semantic HTML: Making the page more organised and accessible with meaningful tags such as <header> , <nav> , <main> and <footer> .

Module sources: Python Tutorial · Arduino Learn

LevelBeginner
Age10–16
Duration30–45 min
PrerequisiteHow the Internet and the Web Work
ContentStandard lesson · 1,411 words
Last updated

One-sentence summary

HTML is the markup language that uses tags to define the headings, paragraphs, lists, links and images of a web page.

Why does it matter?

In the previous lesson we saw that a browser requests a file from a server. The file the browser draws on the screen is very often an HTML file.

Without HTML, a web page is like a blank sheet of paper with no headings and no paragraphs. HTML tells the browser "this is a heading", "this is a paragraph", "this is a link". In other words, it describes what the content is.

Learning HTML is the first step toward building your own web page. You have already written commands in order with Scratch and Python. HTML works with a similar idea: you build the page piece by piece, in an organised way.

What is HTML? Tags and elements

HTML (HyperText Markup Language) is not a programming language; it is a markup language. It marks up text to answer the question "what does this part represent?"

Tag

A tag is a command written inside angle brackets. Most tags have an opening and a closing form. The closing tag contains a slash (/).

<p>Hello, I am a paragraph.</p>

Here <p> is the opening tag and </p> is the closing tag. The letter p comes from the word *paragraph*.

Element

The opening tag, the content and the closing tag together are called an element. The whole example above is a paragraph element.

Some elements are empty and have no closing tag. For example <br>, used for a line break, is one of them.

Attribute

To give a tag extra information, we use an attribute. An attribute is written inside the opening tag.

<a href="https://en.wikipedia.org">Open Wikipedia</a>

Here the href attribute tells the browser which address the link goes to.

The basic page skeleton

Every HTML page starts with the same basic frame. This frame tells the browser how to read the document.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello World</h1>
  </body>
</html>

Let us look at the parts of this skeleton one by one.

<!DOCTYPE html>

This first line tells the browser "this document is written in modern HTML". It is the first line of every page.

<html>

The main element that wraps the whole page. The lang="en" attribute states that the page language is English. This helps screen readers and search engines.

<head>

Holds the invisible information of the page. This content is not shown directly on the screen; it gives instructions to the browser.

<body>

Everything we see on the screen goes here: headings, paragraphs, images and links.

Content tags

Now let us learn the basic tags we place inside <body>.

Headings: <h1><h6>

There are six heading levels, from <h1> to <h6>. <h1> is the largest and most important heading; <h6> is the smallest.

<h1>Robotics Club</h1>
<h2>What Did We Do This Week?</h2>
<h3>Line-Following Robot</h3>

A page usually has a single <h1>. We use headings for order of importance, not for size.

Paragraph: <p>

We write blocks of text with paragraphs.

<p>Today I built my first web page.</p>
<p>On the first try the heading was too big, then I fixed it.</p>

Lists: <ul> and <ol>

Use <ul> for an unordered (bulleted) list and <ol> for an ordered (numbered) list. Each item is a <li> element.

<ul>
  <li>Pencil</li>
  <li>Notebook</li>
  <li>Ruler</li>
</ul>

Link: <a>

We use a link to go to another page. The address is written in the href attribute.

<a href="https://en.wikipedia.org">Visit Wikipedia</a>

Image: <img>

To add an image we use <img>. src holds the image address, and alt holds a description text for someone who cannot see the image.

<img src="robot.png" alt="A small robot with red wheels">

The alt text is very important: it is used if the image does not load or if a screen reader is reading the page aloud. So writing alt means everyone can use the page. This is called accessibility.

Mini practice

Let us build a small page that introduces you. Type the skeleton below into a text editor and save it as about-me.html. Then double-click the file to open it in a browser.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Get to Know Me</title>
  </head>
  <body>
    <h1>Hi, I am a student</h1>
    <p>I am learning robotics and coding.</p>
    <h2>Three things I like</h2>
    <ul>
      <li>Robots</li>
      <li>Puzzles</li>
      <li>Cycling</li>
    </ul>
    <p>To learn more:
      <a href="https://en.wikipedia.org/wiki/HTML">the HTML page</a>
    </p>
  </body>
</html>

After opening the page, try this:

When you save the change and refresh the browser, you see the result right away.

Common mistakes

Forgetting the closing tag

If you write <p> but forget </p>, the following content may stay inside the paragraph. Make it a habit to close every tag you open.

Leaving the alt text empty

Not writing alt when adding an <img> is a common mistake. Write a short text that describes the image in a meaningful way.

Using headings for size

Choosing <h3> just because "the text should be a bit smaller" is wrong. The heading level shows the order of importance of the content. Size is set with CSS (which we will see in the next module).

Mixing up <head> and <body> content

<title> must always be inside <head>. Headings that should appear on the screen (like <h1>) go inside <body>.

Safety note

Lesson summary

Review questions

  1. What is the difference between a tag and an element?
  2. What kinds of content do the <head> and <body> sections hold?
  3. On what basis should we choose headings from <h1> to <h6>?
  4. What does the alt attribute on an <img> tag do?
  5. Which attribute decides which address a link (<a>) goes to?

Answers

  1. A tag is a single command inside angle brackets (like <p>). An element is the whole of the opening tag, content and closing tag (like <p>Hello</p>).
  2. <head> holds invisible information (character set, viewport, tab title). <body> holds all the content shown on the screen (headings, paragraphs, images).
  3. By the order of importance of the content, not by size. <h1> is the most important heading; use <h2>, <h3> and so on for sub-headings.
  4. It is the description text shown or read out if the image does not load or if a screen reader reads the page aloud. It is needed for accessibility.
  5. The href attribute decides it.

Source and verification note

For “Page Skeleton with HTML”, verification focuses on whether the relationship between What is HTML? Tags and elements and Element remains consistent across examples. Examples use standards-oriented HTML, CSS and browser JavaScript. A page should be checked not only visually but also for keyboard use, focus order, mobile layout and meaningful heading structure.

Next lesson

Semantic HTML: Making the page more organised and accessible with meaningful tags such as <header>, <nav>, <main> and <footer>.

Start QuizBack to Web Fundamentals
QUESTION POOL

Reinforce this lesson with 10 questions

This lesson has a pool of 20 questions. Each attempt selects 10 and reshuffles the choices.