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

2016-09-07 Thread Domenic Denicola
Hi Brenton, great to have you here.

From: whatwg [mailto:whatwg-boun...@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 .

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.


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

2016-09-07 Thread brenton strine
For example:


  Tip: You should always use the most semantic element!


Oops,  is for inputs, so that's not right! Should I use a 
heading? Doesn't seem right either. Is this a case for ? The
specification doesn't mention labels under the  definition.

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 .

Cheers!