[html5] Element for advisory, warning, or contingency note
yrocsand at gmail.com
Wed Mar 5 04:55:12 PST 2014
On Tue, Mar 4, 2014 at 11:07 PM, Ian Hickson <ian at hixie.ch> wrote:
> > In the spec, such notes are marked up as <p class="note"> or <div
> > class="note">. Is this considered the correct way, or is there a more
> > specific element that could be used.
> I've been planning on moving these (and examples) to <aside>, though that
> requires also changing to using a different heading structure (since
> <aside> is a sectioning element and thus resets the outline algorithm to
> the top-level heading, if I recall correcty).
Yes, that was one of my concerns. Another subscriber (responding privately)
suggested <small>, which I also though could be a good fit semantically,
and it avoids the "sectioning issue." On the other hand, small is
classified a phrasing content, so it would have to be nested in a <p> if I
understand correctly. Or can it be used in the flow with other <p>'s
(assuming its display is changed to block), i.e.,
<small> is also styled as smaller font in by browsers' default style sheets
so that's something that most (?) would want to override.
> > Some candidates I thought might be possible are <strong>, <em>, <i>,
> > <b>, and <aside>:
> > <aside> I find it hard to say if advisory notes are tangentially related
> > to surrounding content -- I would tend to think not. Also, <aside> is a
> > sectioning element, and I don't think an advisory note is a different
> > section.
> If it's really just an inline paragraph that you happen to want to have
> special styling for, as opposed to a side note, then a class is probably
> the right way to go. (One way to look at it is: if you dropped the classes
> and CSS, would the document still make sense? Or does it only make sense
> if it is properly offset in some stylistic way?)
"happen to want to have special styling for." But surely there'd always be
some *reason* for the special styling? If it's "utilitarian" then <b> is
appropriate according to the spec, no? Or can you provide a specific
example of what you mean here? Perhaps referring to the spec, could you
identify a note that you would mark up as an aside vs. a note that you
would mark up with .note?
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
> Help mailing list
> Help at lists.whatwg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help