4

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.

0

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Then this is strange that MDN and W3Schools pages make their readers to think that there is some another (more simple) way to classify elements. They in fact misinforms their readers.
@jsx97 - What MDN does say is fine. and is justified in not providing a list. W3Schools provides all kinds of misinformation. It's just not a good source and is best avoided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.