Quotations, Code and Dates
What Is It?
Some text needs a special label: a quotation, a book title, a keyboard key, or a date.
What the Tags Mean
blockquote: a longer quotation.q: a short quotation.cite: the title of a work.code: computer code.kbd: keyboard input.time: a date or time.abbr: an abbreviation.address: contact information.
Example 1
Save each example as index.html and open it in your browser. Each code block is a complete page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quotations, Code and Dates</title>
</head>
<body>
<blockquote>
<p>Keep practising a little every day.</p>
</blockquote>
<p>Reading: <cite>My HTML Notes</cite></p>
</body>
</html>Browser preview
What you see: The quotation is usually indented. The work title is usually italic.
Example 2: Another Use
Use kbd for keys and time for a readable date with a machine-readable value.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quotations, Code and Dates</title>
</head>
<body>
<p>Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save.</p>
<p>Class: <time datetime="2026-11-01">1 November 2026</time></p>
</body>
</html>Browser preview
Simple Tip
The datetime value uses year-month-day even when the visible date uses words.
Try It Yourself
Write a class date using time.