Live data from Hacker News

HN's HTML Is Invalid

validator.w3.org

51–60 of 62 posts

Re: HN's HTML Is Invalid

#51
post #49

Earlier quoted context omitted.

Yes, that's why they're in the spec and is the case where their use is still valid, but that's why I qualified my prior comment. HN dates from the period I described and still uses tables for general page layout, hence the original commenter's query to which I replied.

> HN dates from the period I described and still uses tables for general page layout According to Wiki HN dates from 2007. I think Yahoo moved from table to CSS layout earlier. CSS Zen Garden is from around 2003.

All true, but the point at which web dev more generally moved to CSS over tables was considerably later, not least because early CSS was pretty hard to find resources on and work effectively with. Firebug helped a lot from 2005 on, as of course also the browser-native devtools it inspired, but in 2007 it remained far from a surprise to see sites built in what was then still a current, if not the latest, style.

Re: HN's HTML Is Invalid

#52

Earlier quoted context omitted.

Tables first came to be used as a tool for general page layout because IE 5's box model sucked so bad nothing else really worked. It has been a minute since that constraint applied, yeah.

IE5's box model was the good one (* { box-sizing: border-box; } is the vestigial "please use the IE box model" in almost every CSS file today). It was Netscape/early Mozilla's box model that was hard to reason with. But also, using Tables for page layout had less to do with box layout problems and more to do with the lack of something like CSS Grid (finally, decades later). Tables let you define regular grids in a wa…

As a Firefox partisan since back when it was still Phoenix, of course I'd argue it was IE 5's box model that sucked. But the real problem is that there wasn't one box model that behaved identically across all the popular implementations.

Re: HN's HTML Is Invalid

#53

Earlier quoted context omitted.

IE5's box model was the good one (* { box-sizing: border-box; } is the vestigial "please use the IE box model" in almost every CSS file today). It was Netscape/early Mozilla's box model that was hard to reason with. But also, using Tables for page layout had less to do with box layout problems and more to do with the lack of something like CSS Grid (finally, decades later). Tables let you define regular grids in a wa…

As a Firefox partisan since back when it was still Phoenix, of course I'd argue it was IE 5's box model that sucked. But the real problem is that there wasn't one box model that behaved identically across all the popular implementations.

The old Netscape/Phoenix/Firefox box model had borders take up half-inside half-outside and doing any sort of math with it and getting things to align at all was terrible effort in CSS.

I love Firefox to this day, but mathematically the choices that box model made made sense as easier on the renderer but was awful to work with for the web developer.

It's great that we have the choice between box models today and their behavior is better standardized. I know if you surveyed CSS in the wild you'd find most CSS is written for the IE box model (border-box) and yet it is funny that that is the one you have to opt-in to because that adds to the overall impression that CSS by default is broken and needs reset stylesheets and boilerplate.

Re: HN's HTML Is Invalid

#54
post #50

Earlier quoted context omitted.

> So no real use, got it. If you don't care your site potentially becomes unusable broken shit outside of the specific browser you develop it on, there's no real use. https://quirks.spec.whatwg.org/

I'm mistaken then; from the block you copy and pasted I misread it to suggest only IE 9 cares about quirks. In my personal use I'd never seen it matter cross-browser before That said, HN works fine.

Of course HN works fine, if it didn't work fine it'd be fixed by now. "Working fine" is an extremely low bar for any site. As a developer you will still want to avoid quirks mode because it just makes your life harder for no reason.

Re: HN's HTML Is Invalid

#55
post #25

Earlier quoted context omitted.

Wait, there is something newer now?

This year every credible CSS expert is using grid-item-gutter-closed-start specified in qem units. Last year it was flex-interval-bound-distance: 1, auto, 100% but the spacing wasn’t artisanal enough. Many people are also discovering the Tailwind organic vintage where you just add sx-dff-7 gb-y it-9-em on all your elements.

I legitimately cannot tell if this is satire

Re: HN's HTML Is Invalid

#56
post #8

Which shows that you don't need valid HTML to be successful

The biggest websites are proof that you don’t need web accessibility to be successful either, but that doesn’t make it right.

I think it's a mistake to conflate being correct (technical property) with being right (moral judgement). Adhering to a standard is quite optional, and most HTML ever written does not. That's just the way it is. This isn't wrong, but it is incorrect.

Re: HN's HTML Is Invalid

#57
post #38

Earlier quoted context omitted.

> And yet to see a browser that actually cares about DOCTYPE...usually its pretty obvious when the next line is How do browsers determine which mode to use? For HTML documents, browsers use a DOCTYPE in the beginning of the document to decide whether to handle it in quirks mode or standards mode. The DOCTYPE shown in the example, , is the simplest possible, and the one recommended by current HTML standards. Earlier v…

So no real use, got it. Luckily IE 9 has been gone for awhile My point was its silly because the html self-defines being html the second you open the tag, because what else could it even be?

What if the document has omitted the tag?

Re: HN's HTML Is Invalid

#60

Earlier quoted context omitted.

The biggest websites are proof that you don’t need web accessibility to be successful either, but that doesn’t make it right.

I think it's a mistake to conflate being correct (technical property) with being right (moral judgement). Adhering to a standard is quite optional, and most HTML ever written does not. That's just the way it is. This isn't wrong, but it is incorrect.

The question is, is adhering to the HTML Standard (in other words, getting zero errors in the HTML validator) beneficial to websites? For example, does it make the job of web developers easier? Are there fewer user-reported issues in browsers?
Post reply on HN