Live data from Hacker News

Tags to make HTML work like you expect

blog.jim-nielsen.com

121–130 of 248 posts

Re: Tags to make HTML work like you expect

#121

Earlier quoted context omitted.

Reall? Libreoffice at least has a File > Open menu that allows you to specify the separator and other CSV stuff, like the quote character

You have to be inside Excel and use the data import tools. You cannot double click to open, it outs everything in one cell…

Sometimes you double click and it opens everything just fine and silently corrupts and changes and drops data without warning or notification and gives you no way to prevent it.

The day I found that Intellij has a built in CSV tabular editor and viewer was the best day.

Re: Tags to make HTML work like you expect

#122
post #120

Fun fact: both HN and (no doubt not coincidentally) paulgraham.com ship no DOCTYPE and are rendered in Quirks Mode. You can see this in devtools by evaluating `document.compatMode`. I ran into this because I have a little userscript I inject everywhere that helps me copy text in hovered elements (not just links). It does: [...document.querySelectorAll(":hover")].at(-1) to grab the innermost hovered element. It works…

A uBlock filter can do it: `||news.ycombinator.com/*$replace=/ <html/`

Could also use tampermonkey to do that, also perform the same function as OP.

Re: Tags to make HTML work like you expect

#123
post #23

Earlier quoted context omitted.

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

> They introduce zero ambiguity to the language 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…

It sounds like you're headed towards XHTML. The rise and fall of XHTML is well documented and you can binge the whole thing if you're so inclined.

But my summarization is that the reason it doesn't work is that strict document specs are too strict for humans. And at a time when there was legitimate browser competition, the one that made a "best effort" to render invalid content was the winner.

Re: Tags to make HTML work like you expect

#124

I'm not a web developer, so if someone can please enlighten me: Why does this site, and so many "modern" sites like it have it so that the actual content of the site takes up only 20% of my screen? My browser window is 2560x1487. 80% of the screen is blank. I have to zoom in 170% to read the content. With older blogs, I don't have this issue, it just works. Is it on purpose or it is it bad css? Given the title of the…

Probably to not have incredibly wide paragraphs. I will say though, I set my browser to always display HN at like 150% zoom or something like that. They definitely could make the default font size larger. On mobile it looks fine though.

I have HN on 170% zoom too. this a bad design pattern. I shouldn't have to zoom in on every site. Either increasing the font or making sure the content is always at least 50% of the page would be great for me.

Re: Tags to make HTML work like you expect

#125

I still don’t understand what people think they’re accomplishing with the lang attribute. It’s trivial to determine the language, and in the cases where it isn’t, it’s not trivial for the reader, either.

Doesn't it state this in the article?

> Browsers, search engines, assistive technologies, etc. can leverage it to:

> - Get pronunciation and voice right for screen readers

> - Improve indexing and translation accuracy

> - Apply locale-specific tools (e.g. spell-checking)

Re: Tags to make HTML work like you expect

#126

I'm not a web developer, so if someone can please enlighten me: Why does this site, and so many "modern" sites like it have it so that the actual content of the site takes up only 20% of my screen? My browser window is 2560x1487. 80% of the screen is blank. I have to zoom in 170% to read the content. With older blogs, I don't have this issue, it just works. Is it on purpose or it is it bad css? Given the title of the…

I'm not sure, but when I was working with UX years ago, they designed everything for a fixed width and centered it in the screen. Kinda like how HackerNews is, it's centered and doesn't scale to my full width of the monitor.

I understand not using the full width, but unless you zoom in, it feels like I'm viewing tiny text on a smart phone in portrait mode.

You would think browsers themselves would handle the rest, if the website simply specified "center the content div with 60% width" or something like that.

Re: Tags to make HTML work like you expect

#127

Earlier quoted context omitted.

> They introduce zero ambiguity to the language 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…

It sounds like you're headed towards XHTML. The rise and fall of XHTML is well documented and you can binge the whole thing if you're so inclined. But my summarization is that the reason it doesn't work is that strict document specs are too strict for humans. And at a time when there was legitimate browser competition, the one that made a "best effort" to render invalid content was the winner.

The merits and drawbacks of XHTML has already been discussed elsewhere in the thread and I am well aware of it.

> And at a time when there was legitimate browser competition, the one that made a "best effort" to render invalid content was the winner.

Yes, my point is that there is no reason to still write "invalid" code just because it's supported for backwards compatibility reasons. It sounds like you ignored 90% of my comment, or perhaps you replied to the wrong guy?

Re: Tags to make HTML work like you expect

#128
post #60
post #53

Earlier quoted context omitted.

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.

I'll copy what I wrote a few days ago: The fact XHTML didn't gain traction is a mistake we've been paying off for decades. Browser engines could've been simpler; web development tools could've been more robust and powerful much earlier; we would be able to rely on XSLT and invent other ways of processing and consuming web content; we would have proper XHTML modules, instead of the half-baked Web Components we have to…

There's no way it could have gained traction. Consider two browsers. One follows the spec explicitly, and one goes into "best-effort" mode on encountering invalid markup. End users aren't going to care about the philosophical reasoning for why Browser A doesn't show them their school dance recital schedule.

Consider JSON and CSV. Both have formal specs. But in the wild, most parsers are more lenient than the spec.

Re: Tags to make HTML work like you expect

#129
post #59

Earlier quoted context omitted.

I wish `dang` would take some time to go through the website and make some usability updates. HN still uses a font-size value that usually renders to 12px by default as well, making it look insanely small on most modern devices, etc. At quick glance, it looks like they're still using the same CSS that was made public ~13 years ago: https://github.com/wting/hackernews/blob/5a3296417d23d1ecc90...

I find it exactly the right size on both PC and phone. There's a trend to make fonts bigger but I never understood why. Do people really have trouble reading it? I prefer seeing more information at the same time, when I used Discord (on PC), I even switched to IRC mode and made the font smaller so that more text would fit.

I'm low vision and I have to zoom to 175% on HN to read comfortably, this is basically the only site I do to this extreme.

Re: Tags to make HTML work like you expect

#130

I know this was a joke: but I feel there is a last tag missing: ... that will ensure screenreaders skip all your page "chrome" and make life much easier for a lot of folks. As a bonus mark any navigation elements inside main using (or role="navigation").

>I know this was a joke

I'm…missing the joke – could someone explain, please? Thank you.

Post reply on HN