W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2016

Re: [whatwg] What's the element for a paragraph label?

From: David Singer <singer@apple.com>
Date: Thu, 08 Sep 2016 19:40:26 +0200
Message-id: <25F32B89-965A-481C-A166-C1EEE17A88D3@apple.com>
To: "whatwg@whatwg.org" <whatwg@whatwg.org>
I am guessing that he'd like a consistent way to style the terms in a ‘definition of terms’ section, the acronyms in a ‘list of acronyms’ section, and so on.

<div>
 <h>defined terms</h>
 <p><thingbeingdefined>Fruit</thingbeingdefined>: delicious stuff that falls from trees</p>
 …
</div>
<div>
 <h>acronyms</h>
 <p><thingbeingdefined>OTT</thingbeingdefined>: lit. Over the Top, figuratively meaning something excessive</p>
 …
</div>


> On Sep 7, 2016, at 18:49 , Domenic Denicola <d@domenic.me> wrote:
> 
> Hi Brenton, great to have you here.
> 
> From: whatwg [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of brenton strine
> 
>> Is there a semantic element that can be used in a situation like this? If so, I
>> propose adding "label" to the specification for that element.
>> 
>> Then again, maybe this most appropriately a <span>.
> 
> The question is largely about what you're trying to accomplish. What will be interpreting your HTML's semantics? I can think of a few options:
> 
> - If this is part of a series of labeled paragraphs, perhaps you are looking for dl/dt/dd
> - A heading could indeed be appropriate in some cases
> - strong is probably most generally what you are looking for. Indeed, https://html.spec.whatwg.org/multipage/semantics.html#the-strong-element uses it in the very first example ("Importance" and the "Example" paragraph after that).
> - If this is purely a stylistic label, span indeed makes sense.

Dave Singer

singer@mac.com

David Singer
Manager, Software Standards, Apple Inc.
Received on Thursday, 8 September 2016 17:40:55 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:39 UTC