Scroll-behavior

and elements are this document.
But it is not standard HTML Elements, so I have a confusion about that.

Does anyone know about that elements history or something?
If not, I change those examples with standard HTML.

1 Like

Good question.

I’ve never seen them before, never heard of them before, and did not find any reference to them in W3C documentation.

Yet, when I pasted the fragment into the validator (as HTML5 - experimental), the elements weren’t found to be errors.

And the semantics seem odd to me. Not the <scroll-container> so much. But the <scroll-page> children don’t seem like “pages” to me.

I have a suspicion that this isn’t an actual element, but is meant to suggest “any element that is a valid scroll container”.

1 Like

I think you’re right. We can of course use any element on a page, even if they are unrecognised, in which case they just get treated as anonymous inline elements.

I think in this case it would make more sense if the example used semantic elements, say a <section> and some <articles>, but then we added a note to say that this could work with any element that is a valid scroll container.

Agreed. I don’t like the idea of using fake elements in examples, even ones that aren’t meant to actually be run or rendered.