Tabs
Presents two or more passages as peers, each behind its own title, so that none of them comes before another and the learner can weigh one against the next.
It displays as follows:
First case
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut porta, neque id feugiat consectetur, enim ipsum tincidunt nunc, id suscipit mauris urna sit amet lectus.
Second case
Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi.
Third case
Nulla porttitor accumsan tincidunt. Curabitur aliquet quam id dui posuere blandit. Vestibulum ac diam sit amet quam vehicula elementum.
What goes into the tabs is content of the same rank: the same question answered for several cases, the same procedure in the environments it has to run in, the same object seen through more than one discipline. The titles name what tells them apart, and the learner reads them in whatever order they choose, or reads only the one that concerns them.
The component does not supply any order. Every tab is expected to be read independently from the rest.
Only one passage is visible at a time, so the comparison the component invites is made from memory. Tabs are parallel in structure and should be close in length, so the difference between them stand out.
Use cases
- Comparison: to answer the same question for several cases, so that the answers can be held against one another instead of being read one after the other.
- Selection: to give the alternatives among which the learner picks the one that applies to them, such as a procedure that differs by operating system, by tool or by language.
- To show one object from more than one viewpoint, where no viewpoint is the main one and none of them is a conclusion drawn from the others.
Is recommended…
- To title each tab with what distinguishes it. The title is all the learner has to choose from, and a row that fails to add a significative title hides exactly what the component exists to expose.
- To keep the tabs parallel: the same structure, the same kind of detail, comparable length. When one of them is twice the size of the others, the difference the learner notices is the size, which might convey differences regarding their relevance.
- To keep them few. A row that wraps onto a second line stops reading as a set of peers and starts reading as a list. To be clear and keep titles readable, a tabs group should contain between 2 and 5 tabs.
Is discouraged…
- For steps, stages or anything that presumes an order. The component does not dispense sequentiality: whoever opens the third tab first will read it first, and nothing in the page says otherwise.
- For a passage every learner needs. Only one tab is open at a time and most readers will open one; what is in the others is read by whoever goes looking.
- For items that have nothing to compare. Three unrelated notes behind three titles are a filing cabinet, and the learner has no reason to open the second.
Examples
Example 1
One line, three translators
The three renderings answer the same question: what the opening of the Odyssey says in English. None of them is the right one or the last word.
Pope
«The man for wisdom’s various arts renown’d,
Long exercised in woes, O Muse! resound;»
Rhymed couplets, and a hero introduced by an abstract quality before he is named. The line is built to be spoken aloud.
Cowper
«Muse make the man thy theme, for shrewdness famed
And genius versatile, who far and wide
A Wand’rer, after Ilium overthrown,
Discover’d various cities»
Blank verse, and the same qualities given two words instead of one. The sentence runs across the lines rather than closing with them.
Butler
«Tell me, oh Muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy.»
Prose, and a single adjective where the others took a couplet. It reads as narrative, not as invocation.
The question the unit goes on to ask is the same: what is a translator obliged to carry across, and what are they free to leave behind?
Alexander Pope’s Odyssey (1726), William Cowper’s (1791) and Samuel Butler’s (1900), from Wikisource - all in the public domain
Example 2
The one that applies to you
Before the first session you need a working Python 3.11 and a virtual environment in the folder you will be working from.
Windows
Install from the python.org installer and tick «Add python.exe to PATH» on the first screen. Then, in the project folder: py -3.11 -m venv .venv and .venv\Scripts\activate.
macOS
The system Python is not the one to use. Install 3.11 with Homebrew: brew install python@3.11. Then, in the project folder: python3.11 -m venv .venv and source .venv/bin/activate.
Linux
Most distributions package it: on Debian and Ubuntu, sudo apt install python3.11 python3.11-venv. Then, in the project folder: python3.11 -m venv .venv and source .venv/bin/activate.
Whichever you followed, the prompt should now begin with (.venv). That is the only thing the next section assumes.