Live data from Hacker News

Tags to make HTML work like you expect

blog.jim-nielsen.com

41–50 of 248 posts

Re: Tags to make HTML work like you expect

#41

Earlier 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…

You're not alone, this is called XHTML and it was tried but not enough people wanted to use it

Yeah, I remember, when I was at school and first learning HTML and this kind of stuff. When I stumbled upon XHTML, I right away adapted my approach to verify my page as valid XHTML. Guess I was always on this side of things. Maybe machine empathy? Or also human empathy, because someone needs to write those parsers and the logic to process this stuff.

Re: Tags to make HTML work like you expect

#43
post #19

Anyone 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.

Can't say I generally agree with dropping TS for JS but I suppose it's easier to argue when you are working on smaller projects. But here is someone that agrees with you with less qualification than that https://world.hey.com/dhh/turbo-8-is-dropping-typescript-701...

I was introduced to this decision from the Lex Fridman/DHH podcast. He talked a lot about typescript making meta programming very hard. I can see how that would be the case but I don't really understand what sort of meta programming you can do with JS. The general dynamic-ness of it I get.

Re: Tags to make HTML work like you expect

#44

> s/lange/lang/ > Don’t need the “.0”. In fact, the atrocious incomplete spec of this stuff https://www.w3.org/TR/css-viewport-1/ > specifies using strtod to parse the number, which is locale dependent , so in theory on a locale that uses a different decimal separator (e.g. French), the “.0” will be ignored. I have yet to test whether misbehaves (parsing as 1 instead of 1½) with LC_NUMERIC=fr_FR.UTF-8 on any user age…

Wow. This reminds me of Google Sheets formulas, where function parameters are separated with , or ; depending on locale.

Given that world is about evenly split on the decimal separator [0] (and correspondingly on the thousands grouping separator), it’s hard to avoid. You could standardize on “;” as the argument separator, but “1,000” would still remain ambiguous.

[0] https://en.wikipedia.org/wiki/Decimal_separator#Conventions_...

Re: Tags to make HTML work like you expect

#46
post #15

The "without meta utf-8" part of course depends on your browser's default encoding.

What mainstream browsers aren't defaulting to utf-8 in 2025?

html5 does not even allow any other values in . I think you need to use a different doctype to get what the screenshot shows.

Re: Tags to make HTML work like you expect

#47

> s/lange/lang/ > Don’t need the “.0”. In fact, the atrocious incomplete spec of this stuff https://www.w3.org/TR/css-viewport-1/ > specifies using strtod to parse the number, which is locale dependent , so in theory on a locale that uses a different decimal separator (e.g. French), the “.0” will be ignored. I have yet to test whether misbehaves (parsing as 1 instead of 1½) with LC_NUMERIC=fr_FR.UTF-8 on any user age…

Wow. This reminds me of Google Sheets formulas, where function parameters are separated with , or ; depending on locale.

Try Apple Numbers, where even function names are translated and you can’t copy & paste without an error if your locale is, say, German.

Re: Tags to make HTML work like you expect

#48
post #15

The "without meta utf-8" part of course depends on your browser's default encoding.

What mainstream browsers aren't defaulting to utf-8 in 2025?

I wouldn’t be surprised if they don’t for pages loaded from local file URIs.

Re: Tags to make HTML work like you expect

#50
post #47

Earlier quoted context omitted.

Wow. This reminds me of Google Sheets formulas, where function parameters are separated with , or ; depending on locale.

Try Apple Numbers, where even function names are translated and you can’t copy & paste without an error if your locale is, say, German.

aha, in Microsoft Excel they translate even the shortcuts. The Brazilian version Ctrl-s is "Underline" instead of "Save". Every sheet of mine ends with a lot of underlined cells :-)
Post reply on HN