Web Technologies 2026 · BiUH · Exercise

The Quote Collection

Shared practice material · structure · styling · layout

webtech.landrock.io

Why we all build the same thing

This is the exercise, not your project.

Everyone works on the same content, so structure and layout can be taught to the whole room at once. Twenty short items with identical shape is ideal material for that.

Your own project is separate — a website of your choosing, at least four pages, which you decide on later in the course.

You may reuse anything from this exercise in your project, including the quote page itself.

Your project · all semester

Collect twenty quotes.

Song lyrics. Film lines. A sentence from a book. Something a teacher said. A proverb from your hometown. Any language — with a translation if it is not English.

Each one needs: the text, who said it, where it is from.

Start with five. Text, author, source — any language, with a translation if it is not English.

The structure — five of these, by hand

<article class="quote">
  <blockquote>
    <p>Text of the quote.</p>
  </blockquote>
  <footer>
    <cite>Author Name</cite>, <span class="source">Source</span>
  </footer>
</article>

<blockquote> and <cite> are not decoration. They exist for exactly this.

Ask: what does a machine reading this page learn from it?

You wrote no CSS. This is what the browser does on its own.

Default rendering

The best time to plant a tree was twenty years ago. The second best time is now.

— Chinese proverb, traditional

What it already tells you

  • The quote is indented — the browser knows it is a quotation
  • <cite> is italic — it knows that is a source
  • It is a block, not a line of text

Nobody styled this. The meaning of the tags produced it.

This is what "semantic" means in practice, not in theory.

Where this is going

The same markup, styled.

The best time to plant a tree was twenty years ago. The second best time is now.

Chinese proverb, traditional
.quote {
  max-width: 34rem;
  padding: 1.1em 1.3em;
  background: #fff;
  border: 1px solid #dcd8d0;
  border-left: 4px solid #c2410c;
  border-radius: 10px;
}

Not one character of the HTML changed. Structure and appearance are separate things.

Later in the course

And later it does something.

The best time to plant a tree was twenty years ago. The second best time is now.

CP
Chinese proverb
traditional
  • Avatar — an image, a format, a request
  • Author row — Flexbox, inside the card
  • Like button — an event, and a number that changes

One structure. Everything else is added to it.

This is why we start with structure and wait. Everything later attaches to it.

Twenty of them · the layout question

Where does the box live on the page?

Today — flow

quote
quote
quote

One under the other. The browser's default. Correct for today.

Session 4 — Flexbox

quote
quote
quote
quote
quote

They flow and wrap. A long one makes its row taller. Last row ragged.

Session 4 — Grid

quote
quote
quote
quote
quote
quote

Columns line up across rows. The structure is decided in advance.

You will build the collection both ways — and then argue for one.

The answer, so you are not waiting for it

Both. At different levels of the same page.

Grid — the collection

Twenty cards in a structure you decided in advance. Columns that line up.

Flexbox — inside the card

Avatar, name, like button in a row. One direction, sized to content.

Anyone who tells you Grid replaced Flexbox is wrong. You will prove it yourself.

Your page looks bad right now.
It is also correct.

You want to style it. Wait. What you have built is a structure that states what it is — and the browser already shows it working.

Styling is the next block. The delay is the lesson.

CSS: one rule, five changes.

.quote {
  max-width: 34rem;
  padding: 1.5rem;
  border-left: 3px solid #c2410c;
  background: #fff;
}

Five cards on the page. One selector changes all of them. That is the entire argument for classes — and you can see it.

Start with flow, the box model and spacing. Flexbox and Grid come once you have twenty quotes.

Everything is a box

The box model

margin    ← space outside
border    ← the edge
padding   ← space inside
content   ← your text

Open DevTools. Click any element. The box model diagram is right there, and you can change the numbers and watch it move.

Change it there first. Then put it in your file.

webtech.landrock.io/demos/box-model.html

Drag the sliders and watch the box change — open it now, and again tonight.

This is the second time today DevTools is the answer. It will not be the last.

Exercise · recap

What this exercise teaches.

webtech.landrock.io/demos/flex-vs-grid.html

Try the layouts side by side before you choose.

← → navigate · F fullscreen · P print · Copy never turns the page