[html5] Element for advisory, warning, or contingency note

Ian Hickson ian at hixie.ch
Mon Mar 10 15:31:30 PDT 2014


On Wed, 5 Mar 2014, Cory Sand wrote:
> >
> > 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?

Well, for example, it's the difference between "notes" and "warnings" in 
the HTML spec. Both are styled specially, but the notes really don't 
belong in the main flow of the prose (they're non-normative), whereas the 
warnings are part of the content (and are very much normative). If the 
notes styling falls back to a regular paragraph (as it does now), then the 
reader could get confused as to the relevance of the text (that's why I 
want to move it to an <aside>, which might be more obviously styled in 
browsers that don't honour the CSS). The warnings, on the other hand, 
wouldn't be confusing if they degraded to just being part of the text, so 
they wouldn't be <aside>s.

(On the other hand, the warnings probably should be <strong>s.)


On Fri, 7 Mar 2014, Gordon Baker wrote:
>
> I'll go ahead and answer my own concern about <small> being phrasing 
> content. I looked at the spec in regards to paragraphs, and a <small> 
> element between paragraphs would be treated as an implicit paragraph. So 
> no concern there, it seems.

Yeah, if you just want to mark up one paragraph of side comments such as 
small print, then <small> with an implied paragraph could work. You could 
also do <p><small>...</small></p> and just assert that you will never put 
a <small> anywhere except as the sole child of a <p>; then you can just 
style the <small> directly and still be confident that you won't end up in 
a situation like the following:

   <p>...
   <small>oops, forgot the normally-optional closing "p" end tag, so this 
   is part of the previous paragraph</small>
   <p>...

...or this one:

   <p>...</p>
   <small>this is a note</small>
   <small>oops, this ended up part of the same paragraph as the previous 
   note</small>
   <p>...</p>

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list