Skip to main content

Day 64 of 100DaysOfSpec, document outlines and the p element

I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft's official opinion of the spec. Subsections not listed below were read without comment.

Currently reading in 4.3 Sections and 4.4 Grouping content. Some of this post extends yesterday’s reading.

UAs = user agents = browsers and other HTML document parsers/renderers

4.3.10.2 Sample outlines

The only comment I have here is it would be good to look at this set of code samples, which illustrate principles from yesterday’s reading on document outlines. As with any good set of examples, the first couple are pretty straightforward, and then they get into a little more weirdness.

Okay I guess what I could say is: if no graphical UAs are implementing document outlines yet, does it make sense obsessing over how more unique markup structures will be parsed by this algorithm? Meh, maybe not.

4.3.11 Usage summary

Examples on how sectioning elements, etc. should be used. What I think would've gotten the message across better is if they combined all these examples into one longer chunk of markup, and then you could click on an element name (article, etc) and that would highlight the tags of the element in question inside the cumulative code example.

4.3.11.1 Article or section?

“A section forms part of something else. An article is its own thing.” L O L funny how the formality of your content changes when you’re writing up a non-normative section.

…Okay, this section makes NO SENSE. Who wrote this? Actually laughing at the spec…sorry whoever, but this needs to be revisited.

4.4 Grouping content

New section! Woo hoo.

4.4.1 The p element

A paragraph!

  • Categories: flow and palpable content. Notably, palpable content needs to contain at least one node, which includes simple text that is not inter-element whitespace.
  • You can omit the end tag if a p element is immediately followed by one among a laundry list of elements (or if the parent element has no other content and is not an a element), but again, if that’s somehow necessary there might be something else broken with your process or tools…
  • There are other ways to acceptably create typographical paragraph breaks than using the p tag: “ for instance using inline pilcrows (¶)”
  • Should not be used when something more semantically specific is available.
  • Can’t actually contain ul or ol elements. That’s not something I’ve wanted to do, because it doesn’t make sense to me semantically, but I had no idea it actually wasn’t allowed. I bet this stuff is all over the internet because fun with WYSIWYG!

Responses

My blog uses Webmentions. Responses from Mastodon and other sites that send Webmentions will show up here.

No Webmentions have been sent to this post yet.