Meaningful Text and Built-in Interactivity

HTML has an element for quotes, dates, abbreviations, code and edits, and some elements do things on their own: sections that open and close, popovers and dialogs, all with no JavaScript. You will finish by checking your page with the validator and fixing what it finds.

Updated

Text with Meaning

  1. Quotes, Dates, Code and More (Apprentice): HTML has small elements that say what a piece of text is, such as a quote, a date, an abbreviation, a key to press or a price that changed, so browsers, search engines and screen readers can treat it right.

Interactive with No JavaScript

  1. Details and Summary: Show and Hide (Apprentice): The details and summary elements make a section that opens and closes when it's clicked, such as an FAQ answer or a quiz answer, with no JavaScript and with keyboard support built in.
  2. Popovers and Dialogs (Journeyman): A popover is a note that pops up over the page from a button and closes with Esc or a click outside, and a modal dialog is a box that blocks the page until the visitor closes it, both with no JavaScript.

Validating Your HTML

  1. Validating Your Page (Apprentice): The W3C Nu HTML Checker reads your page against HTML's rules and lists every mistake with its line number, so you can find and fix what the browser quietly covered up.

Exercise: A Trivia Night Page

  1. Exercise: A Trivia Night Page (Apprentice): Build the page for a pizzeria's trivia night, with answers that open on a click, house rules in a popover, the date in a time element and a quote from last month's winners, and let the tests and the validator check it.