Lists
In HTML, there are three main kinds of lists: ordered lists (usually numbered), unordered lists (i.e. bullet lists) and definition lists (like a dictionary of entry words and their explanations).
In this chapter, an assortment of lists alone and in combination with each other and with surrounding text.
Simple lists
Here are the opening paragraphs of Charles Dickens’s A Tale of Two Cities, as a list.
- It was the best of times,
- it was the worst of times,
- it was the age of wisdom,
- it was the age of foolishness,
- it was the epoch of belief,
- it was the epoch of incredulity,
- it was the season of Light,
- it was the season of Darkness,
- it was the spring of hope,
- it was the winter of despair,
- we had everything before us,
- we had nothing before us,
- we were all going direct to Heaven,
- we were all going direct the other way–
- in short, the period was so far like the present period, that some of
- its noisiest authorities insisted on its being received, for good or for
- evil, in the superlative degree of comparison only.
And the following paragraph as a numbered list:
- There were a king with a large jaw and a queen with a plain face, on the throne of England.
- There were a king with a large jaw and a queen with a fair face, on the throne of France.
- In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever.
Let’s ruin some more of that fine book to show nested lists:
- It was the year of Our Lord one thousand seven hundred and seventy-five.
-
Spiritual revelations were conceded to England at that favoured period, as at this.
We might have a paragraph here, followed by a nested list:
- Mrs. Southcott had recently attained her five-and-twentieth blessed birthday, of whom a prophetic private in the Life Guards had heralded the sublime appearance by announcing that arrangements were made for the swallowing up of London and Westminster.
- Even the Cock-lane ghost had been laid only a round dozen of years, after rapping out its messages, as the spirits of this very year last past (supernaturally deficient in originality) rapped out theirs.
- Mere messages in the earthly order of events had lately come to the English Crown and People, from a congress of British subjects in America: which, strange to relate, have proved more important to the human race than any communications yet received through any of the chickens of the Cock-lane brood.
- France, less favoured on the whole as to matters spiritual than her sister of the shield and trident, rolled with exceeding smoothness down hill, making paper money and spending it.
- Under the guidance of her Christian pastors, she entertained herself, besides, with such humane achievements as sentencing a youth to have his hands cut off, his tongue torn out with pincers, and his body burned alive, because he had not kneeled down in the rain to do honour to a dirty procession of monks which passed within his view, at a distance of some fifty or sixty yards.
- It is likely enough that, rooted in the woods of France and Norway, there were growing trees, when that sufferer was put to death, already marked by the Woodman, Fate, to come down and be sawn into boards, to make a certain movable framework with a sack and a knife in it, terrible in history.
We might have a paragraph here, followed by another list item:
- It is likely enough that in the rough outhouses of some tillers of the heavy lands adjacent to Paris, there were sheltered from the weather that very day, rude carts, bespattered with rustic mire, snuffed about by pigs, and roosted in by poultry, which the Farmer, Death, had already set apart to be his tumbrils of the Revolution.
- But that Woodman and that Farmer, though they work unceasingly, work silently, and no one heard them as they went about with muffled tread: the rather, forasmuch as to entertain any suspicion that they were awake, was to be atheistical and traitorous.
- Under the guidance of her Christian pastors, she entertained herself, besides, with such humane achievements as sentencing a youth to have his hands cut off, his tongue torn out with pincers, and his body burned alive, because he had not kneeled down in the rain to do honour to a dirty procession of monks which passed within his view, at a distance of some fifty or sixty yards.
- In England, there was scarcely an amount of order and protection to justify much national boasting.
- Daring burglaries by armed men, and highway robberies, took place in the capital itself every night;
-
families were publicly cautioned not to go out of town without removing their furniture to upholsterers’ warehouses for security;
(We might have a paragraph here, followed by a nested list.)
- the highwayman in the dark was a City tradesman in the light, and, being recognised and challenged by his fellow-tradesman whom he stopped in his character of “the Captain,” gallantly shot him through the head and rode away;
- the mail was waylaid by seven robbers, and the guard shot three dead, and then got shot dead himself by the other four, “in consequence of the failure of his ammunition:” after which the mail was robbed in peace;
- that magnificent potentate, the Lord Mayor of London, was made to stand and deliver on Turnham Green, by one highwayman, who despoiled the illustrious creature in sight of all his retinue;
- prisoners in London gaols fought battles with their turnkeys, and the majesty of the law fired blunderbusses in among them, loaded with rounds of shot and ball;
- thieves snipped off diamond crosses from the necks of noble lords at Court drawing-rooms;
- musketeers went into St. Giles’s, to search for contraband goods, and the mob fired on the musketeers, and the musketeers fired on the mob, and nobody thought any of these occurrences much out of the common way.
- In the midst of them, the hangman, ever busy and ever worse than useless, was in constant requisition; now, stringing up long rows of miscellaneous criminals; now, hanging a housebreaker on Saturday who had been taken on Tuesday; now, burning people in the hand at Newgate by the dozen, and now burning pamphlets at the door of Westminster Hall; to-day, taking the life of an atrocious murderer, and to-morrow of a wretched pilferer who had robbed a farmer’s boy of sixpence.
Chapter contents
In kramdown, you can get a list of all the headings in a file by adding the tag {:toc}
after a single list item. They automatically get an id of markdown-toc
. How does this theme handle those in-chapter tables of contents?
You can exclude a heading from that in-chapter TOC by giving it a no_toc
class, which we’ve done to the first ‘Lists’ heading in this chapter.
Bibliographies
In book-publishing convention, lists of references – known as bibliographies – usually have a particular layout. Most often, they have no marker (bullet or number) and a hanging indent, making it easy to scan their initial words, which are usually the surnames of the authors. We mark up bibliographies by giving a list the class bibliography
. How does this theme handle a bibliography? Here are Maria Popova’s ten essential books on typography.
- Ruder, Emil: Typographie: A Manual of Design
- Rjeily, Rana Abou: Cultural Connectives
- Bringhurst, Robert: The Elements of Typographic Style
- Lupton, Ellen: Thinking with Type: A Critical Guide for Designers, Writers, Editors, & Students
- Bantjes, Marian: I Wonder
- Garfield, Simon: Just My Type: A Book About Fonts
- Gill, Eric: An Essay on Typography
- Fili, Louise: Scripts: Elegant Lettering from Design’s Golden Age
- Tholenaar, Jan: Type: A Visual History of Typefaces and Graphic Styles, Vol. 1
- FL@33: The 3D Type Book
What about bibliographies with really long, complicated titles? Since we’re using Jekyll, here are some things others have written while working with things called Jekyll – MLA style.
- Hustis, Harriet. “Hyding Nietzsche in Robert Louis Stevenson’s Gothic of Philosophy.” Studies in English Literature, 1500-1900 49.4 (2009): 993-1007. Web.
- Van Valkenburgh, Michael R. “The Flower Gardens of Gertrude Jekyll and Their Twentieth-Century Transformations.” Design Quarterly 137 (1987): 1-32. Web.
- Radchuk, Volodymyr, Borisjuk Ljudmilla, Radchuk Ruslana, Steinbiss Hans-Henning, Rolletschek Hardy, Broeders Sylvia, and Wobus Ulrich. “Jekyll Encodes a Novel Protein Involved in the Sexual Reproduction of Barley.” The Plant Cell 18.7 (2006): 1652-666. Web.
- Walsh, Emily C., and Didier Y. R. Stainier. “UDP-Glucose Dehydrogenase Required for Cardiac Valve Formation in Zebrafish.” Science 293.5535 (2001): 1670-673. Web.
- Wilkins, Thomas Hart. “Sir Joseph Jekyll and His Impact on Oglethorpe’s Georgia.” The Georgia Historical Quarterly 91.2 (2007): 119-34. Web.
Definitions and glossaries
In HTML definition lists are useful semantic structures, especially for things like glossaries. Here is a basic definition list, using definitions of new words from OxfordDictionaries.com in 2014.
- acquihire, n.
- buying out a company primarily for the skills and expertise of its staff…
- adorbs, adj.
- (informal) arousing great delight; cute or adorable
- air punch, n.
- thrusting one’s clenched fist up into the air, typically as a gesture of triumph…
- amazeballs, adj.
- (informal) very impressive, enjoyable, or attractive
- anti-vax, adj.
- (US informal) opposed to vaccination
- Bank of Mum and Dad, phr.
- (Brit. informal) a person’s parents regarded as source of financial assistance
- bare, adv.
- (Brit. informal) very; really (used as an intensifier)
- bedroom tax, n.
- (in the UK) informal name for a measure introduced in the Welfare Reform Act 2012…
- binge-watch, v.
- (informal) watch multiple episodes of (a television programme) in rapid succession…
- bro hug, n.
- (US informal) friendly embrace between two men
- clickbait, n.
- (informal) (on the Internet) content…whose main purpose is to attract attention and draw visitors to a particular web page
- cord cutting, n.
- (informal) practice of cancelling a pay television subscription or landline phone connection in favour of an alternative Internet-based or wireless service
- cotch, v.
- (Brit. informal) spend time relaxing; stay or sleep somewhere on a temporary basis
- cray, adj. (also cray cray)
- (US informal) crazy