1
Lecture 3 Rendering HTML
Tirsvad edited this page 2026-11-06 06:08:28 +01:00

English · Dansk · Bahasa Melayu

Lecture 3: Rendering HTML

A centred heading, a paragraph and two images

Code: src/higher_lower/presentation/lectures/step_03_html.py.

What we gained

  • A route can return HTML, not only a plain string.
  • Inline CSS such as style='text-align: center' styles one element.
  • <img> is a self-closing tag; its src is a picture or GIF address and width sets the size.
  • Use different quotation marks outside and inside, so the Python string and the HTML attribute do not end each other.