Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

A reference list of block- and inline-level elements

I look for an authoritative reference list of all HTML block and inline elements. (That is, each element should me classified as either "block" or "inline".)

There are three sources I have found:

MDN pages doesn’t provide a list of elements at all, and the list on W3Schools is randomly incomplete: for example, it doesn’t provide any mention of <mark>, <u>, <s> or <tbody> but nevertheless mentions <b> and <thead>.

I suppose there is a reference somewhere in W3 standards, but I cannot find it myself.

>Solution :

No such list exists. The idea of dividing HTML elements into inline and block elements is firmly rooted in the 1990s and times have moved on.

HTML 4 divided most, but not all, elements into %inline and %block for the purpose of describing which elements could be children of which other elements.

The current HTML standard takes a much more nuanced approach with categories including flow, sectioning, and phrasing (among others).

CSS has a display property which includes inline and block among the values it can take. Back in CSS 1 those were half of all the values it could take, today MDN lists over 20 values and combinations of values.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading