Book 3 — HTML, CSS Basics

Python for All

Chapter Two — Text, Emphasis & Quotes

Thanasis Troboukis  ·  All Books

Book Three · Chapter Two

Text, Emphasis & Quotes

Good journalism relies on clarity and attribution. HTML has specific tags for emphasis, pull quotes, and citing your sources.

Emphasis — Strong and Italic

Not all words carry the same weight. In print, editors use bold and italic to signal importance, titles, foreign words, or spoken stress. HTML provides two semantic tags for this purpose — and they carry meaning beyond just visual styling.

<strong> marks text as strongly important. By default browsers render it bold, but its real purpose is semantic: this word matters more than the surrounding text. Screen readers may give it a different emphasis in speech.

<em> marks text as emphasised — typically rendered in italics. Use it for titles of works, foreign-language terms, or words that carry spoken stress in the sentence.

HTML · Try it

HTML

CSS

Live Preview

Semantic vs. visual: Avoid using <b> (bold) and <i> (italic) — they are purely visual. Use <strong> and <em> instead. They convey meaning, not just appearance, which makes your HTML accessible and machine-readable.

Blockquotes — Attributing Sources

Attribution is the cornerstone of journalism. When you quote a source directly, HTML gives you the <blockquote> element — a block-level container for extended quotations. It is visually indented by default, signalling to the reader that this is someone else's words.

Inside the blockquote, use a <p> for the quoted text and a <footer> (or a <cite> element) to attribute the source.

HTML · Try it

HTML

CSS

Live Preview

Notice how the blockquote styling — the left border, the background tint, the italic text — makes the quote visually distinct from the body text. This pattern appears on almost every major news website.

Other Useful Inline Tags

HTML has several small but powerful inline elements that are especially useful for journalism.

<mark> highlights text, like a yellow marker. Use it to draw attention to key facts in a data-heavy passage.

<abbr title="..."> marks an abbreviation and provides the full expansion as a tooltip. Hover over the abbreviation in the preview to see it.

<time datetime="..."> marks a date or time and gives it a machine-readable format. Search engines and social media platforms use this to understand when your article was published or when an event occurred.

HTML · Try it

HTML

CSS

Live Preview

Your Turn — Build a Quoted Story

Write a short news article (real or imagined) that includes:

HTML · Your turn

HTML

CSS

Live Preview

What you have learned in this chapter: <strong> and <em> for inline emphasis, <blockquote> for source attribution, and <mark>, <abbr>, and <time> for richer annotation. Next chapter: adding links and photographs.

Chapter Navigation

Move between chapters.