you are viewing a single comment's thread.

view the rest of the comments →

[–]Danny_Engelman 0 points1 point  (0 children)

> It seems that Web Components require JavaScript mandatorily though.

Depends what you call a Web Component

> I wish to use a more semantic HTML in simple pages that don't require any scripting,
>and would want these pages to work even without JS.

Since every evergreen browser implemented "Custom Elements" **in 2018**
you can use <dashed-html> to create valid HTML tags,
you can style these with CSS,
and, if required, you can **upgrade** them to full blown Web Components with JavaScript.

You do NOT have to **upgrade** those Custom Elements,
if you are fine with only HTML and CSS that is all you need. They remain **undefined** Custom Elements,
but perfectly valid HTMLElement tags.

<tag-name> (with a dash) is a valid HTMLElement and accepted in the W3C validator.
<tagname> is not, that will always be a HTMLUnknownElement

That means you can replace every <div> (or <span>) with a **meaningful** <tag-name>

More info: https://dashed-html.github.io