←back to thread

451 points todsacerdoti | 8 comments | | HN request time: 0.435s | source | bottom
1. interstice ◴[] No.45058930[source]
> You are allowed to just make up elements as long as their names contain a hyphen

RIP any semblance of using meaningful tags for machine readability I guess.

replies(4): >>45058975 #>>45059016 #>>45059216 #>>45062064 #
2. rebane2001 ◴[] No.45058975[source]
it's a lot more readable than a bunch of divs

if an element that semantically fits your needs already exists you don't need to make up an element in the first place

replies(1): >>45059849 #
3. voat ◴[] No.45059016[source]
And even if they don't contain a hyphen! You can just <use> <anything> <you> <want>
replies(1): >>45060531 #
4. nozzlegear ◴[] No.45059216[source]
What's the use case for machine readability these days?
5. mixmastamyk ◴[] No.45059849[source]
Hmmm, I thought you had to register these with JS first, but my browser seems to recognize them.
6. masklinn ◴[] No.45060531[source]
The soft-requirement for hyphens is a form of namespacing: nothing precludes whatwg from adding <use> or <want> elements to HTML in the future, and that would conflict with and possibly break your page.
replies(1): >>45062110 #
7. timeon ◴[] No.45062064[source]
We could have that with XHTML+DTDs...
8. 1718627440 ◴[] No.45062110{3}[source]
To prove your point, <use> already exists although in SVG. https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/E...