It's 2025, the end of it. Is this really necessary to share?
Tags to make HTML work like you expect
61–70 of 248 posts
Re: Tags to make HTML work like you expect
#62Note that and auto-close and don't need to be terminated. Also, wrapping the tags in an actual is optional. You also don't need the quotes as long the attribute doesn't have spaces or the like; is OK. (kind of pointless as the average website fetches a bazillion bytes of javascript for every page load nowadays, but sometimes slimming things down as much as possible can be fun and satisfying)
Re: Tags to make HTML work like you expect
#63Anyone else prefer to use web components without bundling? I probably should not admit this, but I have been using Lit Elements with raw JavaScript code. Because I stopped using autocomplete awhile ago. I guess not using TypeScript at this point is basically the equivalent for many people these days of saying that I use punch cards.
Yes! not only that but without ShadowDOM as well.
Re: Tags to make HTML work like you expect
#64Anyone else prefer to use web components without bundling? I probably should not admit this, but I have been using Lit Elements with raw JavaScript code. Because I stopped using autocomplete awhile ago. I guess not using TypeScript at this point is basically the equivalent for many people these days of saying that I use punch cards.
37 Signals [0] famously uses their own Stimulus [1] framework on most of their products. Their CEO is a proponent of the whole no-build approach because of the additional complexity it adds, and because it makes it difficult for people to pop your code and learn from it. [0]: https://basecamp.com/ [1]: https://stimulus.hotwired.dev/
It's also more complex to do JS builds in Ruby when Ruby isn't up to the task of doing builds performantly and the only good option is calling out to other binaries. That can also be viewed from the outside as "we painted ourselves into a corner, and now we will discuss the virtues of standing in corners". Compared to Bun, this feels like a dated perspective.
DHH has had a lot of opinions, he's not wrong on many things but he's also not universally right for all scenarios either and the world moved past him back in like 2010.
Re: Tags to make HTML work like you expect
#65Earlier quoted context omitted.
Not sure if this still is the case, but Excel used to fail to open CSV files correctly if the locale used another list separator than ',' – for example ';'.
I’m happy to report it still fails and causes me great pain.
Re: Tags to make HTML work like you expect
#66Earlier quoted context omitted.
They're not, at all. It was invented by Facebook, but it's literally just a few lines of metadata that applications can choose to read if they want.
Being invented by $company does not preclude it from being a standard. https://en.wikipedia.org/wiki/Technical_standard > A technical standard may be developed privately or unilaterally, for example by a corporation, regulatory body, military, etc. PDF is now an international standard (ISO 32000) but it was invented by Adobe. HTML was invented at the CERN and is now controlled by W3C (a private consortium). OpenGL wa…
Re: Tags to make HTML work like you expect
#67Earlier quoted context omitted.
Being invented by $company does not preclude it from being a standard. https://en.wikipedia.org/wiki/Technical_standard > A technical standard may be developed privately or unilaterally, for example by a corporation, regulatory body, military, etc. PDF is now an international standard (ISO 32000) but it was invented by Adobe. HTML was invented at the CERN and is now controlled by W3C (a private consortium). OpenGL wa…
Did you mean to type "does not" in that first sentence? Otherwise, the rest of your comment acts as evidence against it.
Re: Tags to make HTML work like you expect
#68It's 2025, the end of it. Is this really necessary to share?
Every day you can expect 10000 people learning a thing you thought everyone knew: https://xkcd.com/1053/ To quote the alt text: "Saying 'what kind of an idiot doesn't know about the Yellowstone supervolcano' is so much more boring than telling someone about the Yellowstone supervolcano for the first time."
Re: Tags to make HTML work like you expect
#69Earlier quoted context omitted.
This kind of thing will always just feel shoddy to me. It is not much work to properly close a tag. The number of bytes saved is negligible, compared to basically any other aspect of a website. Avoiding not needed div spam already would save more. Or for example making sure CSS is not bloated. And of course avoiding downloading 3MB of JS. What this achieves is making the syntax more irregular and harder to parse. I w…
Implicit elements and end tags have been a part of HTML since the very beginning. They introduce zero ambiguity to the language, they’re very widely used, and any parser incapable of handling them violates the spec and would be incapable of handling piles of real‐world strict, standards‐compliant HTML. > I wish all these tolerances wouldn't exist in HTML5 and browsers simply showed an error, instead of being lenient.…
Well, to parsing it for machines yes, but for humans writing and reading it they are helpful. For example, if you have
foo
bar
and change it to foo
bar
suddenly you've got a syntax error (or some quirks mode rendering with nested divs).The "redundancy" of closing the tags acts basically like a checksum protecting against the "background radiation" of human editing. And if you're writing raw HTML without an editor that can autocomplete the closing tags then you're doing it wrong anyway. Yes that used to be common before and yes it's a useful backwards compatibility / newbie friendly feature for the language, but that doesn't mean you should use it if you know what you're doing.
Re: Tags to make HTML work like you expect
#70Earlier quoted context omitted.
oh man, I wish XHTML had won the war. But so many people (and CMSes) were creating dodgy markup that simply rendered yellow screens of doom, that no-one wanted it :(
i'm glad it never caught on. the case sensitivity (especially for css), having to remember the xmlns namespace URI in the root element, CDATA sections for inline scripts, and insane ideas from companies about extending it further with more xml namespaced elements... it was madness.