Lurker News

Comments (93) 42 threads

Earlier comments
jean-4 replies#
Good stuff. Would be even nicer if it showed information about optionally self-closing tags, which is one of the main reasons I occasionally need to look at the spec. For instance:

> A p element's end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, div, dl, fieldset, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, main, nav, ol, p, pre, section, table, or ul, element, or if there is no more content in the parent element and the parent element is not an a element.
Links to the relevant parts of the official spec would be nice too, e.g. https://www.w3.org/TR/html5/grouping-content.html#the-p-elem...

nathancahill#
Why would you do that to yourself?
talmand1 reply#
I'd rather just close the tag instead of trying to recall the specific instances of when I'm not required to close the tag.
moron4hire#
I think the point is that you may not be expecting the P tag to auto close, in the case of things like Address.
ytugiuyghvk#
Nit: self-closing refers to tags that are closed like .
javajosh#
Without compatibility information this is more dangerous than useful. For example, a naive HTML author would use the semantic tags, only to fail in most browsers. There is mention neither of compatibility nor polyfill. Better off with MDN and caniuse.com.
teh_klev#
Nice...would be useful to have the summary of what a tag's purpose is on the main page list of tags. For three letter or less tags it's not always obvious what I'm looking to achieve a specific task.
xophishox#
Is there something similar to this for javascript?

I really find this format super easy to read, even if there may be slight inconsistencies and nuances to reading it.

Load more comments