Heads and labels [225]


Comparison of headings and labels, and the use of <head> and <label>


Headings and labels overlap to some degree; both give identifying information about a chunk of text. Although we can identify different functions for the two (for instance, naming versus sequencing), we nonetheless see these two functions combined in many places (e.g. “Chapter 1: The Monk”), which makes it difficult to base a consistent encoding practice on function alone.

The WWP uses <head> for

-- all headings at the top of <div>-level components regardless of their content, e.g. <div>, <lg type="poem.foo">

-- descriptive (non-sequencing) headings of non-<div> elements, e.g. stanzas.

We use <label> for sequence-based labels of non-<div> components, e.g. stanzas, list items, paragraphs

A sequence-based label consists of a sequencing component (number, letter, other sequencing indicator, e.g. “First”, “2nd”, “Last”, “5”) accompanied by an optional word indicating a unit of measure: e.g. “stanza”, “chapter”, “question”, etc.)

In cases of doubt, or if both sequencing and non-sequencing information are present (e.g. Stanza 1: The Bird), use <head>.

Some specific cases:

Chapter and other <div> titles are always encoded with <head>, even if they just consist of a number. Titles of independent poems always get encoded with <head>, whether they are surrounded by both a DIV and <lg type="poem.foo"> or just with <lg type="poem.foo"> (as with poems appearing nested in prose narratives).

Sequence indicators for stanzas, paragraphs, list items (whether they are numbers, letters, or other sequencing marks) are always encoded with <label>.

Titles of individual stanzas within a single poem consisting of descriptive phrases like “The bluebird” get <head>.

Dates are an interesting borderline case, even though they’re encoded with <dateline> and hence don’t really require a solution here. When used at the start of diary entries or other chunks of prose, dates contain both a sequencing function and a naming or heading-like function. When used in something like a change log, where the date serves strictly as an ordering device for a sequence of events or textual units, it seems much more exclusively like a label.

Note that since <head> isn’t legal as a child of <p>, there appears not to be a direct analogy between poetry and prose as to when you may use <head> (i.e. you may never use <head> in <p>, but you may in <lg>, which looks like a comparable thing). However, the presence of a <head>-like thing at the top of a <p> constitutes evidence that this is really a <div>. This is OK.

list all entries