Live data from Hacker News

HTML is the Web

petelambert.com

311–320 of 341 posts

Re: HTML is the Web

#311

The biggest takeaway is that HTML was originally designed to degrade gracefully. If your browser didn't support the intended graphical layout, it would still be able to extract the hierarchy and display a usable web page, even if you were using pure text (e.g. lynx). This kept the web accessible no matter what you were using. These days, none of that occurs. Just try switching off Javascript (I use NoScript heavily t…

Web pages should be designed to load without js.

You could turn it around to say that screen readers should support javascript. Some already do. They can execute the scripts and _then_ read the resulting DOM tree.

Re: HTML is the Web

#312
post #122
post #76

Earlier quoted context omitted.

(Citation needed.) They didn't demand it per se because no one actually asked. I'm inferring from the fact that users spent much more time on the interactive websites which resulted in more revenue for those sites and everyone else copying. There might have been a reason other than the interactivity itself, but we are where we are now because of user behaviour.

How efficient was that increased time spent? Does the user actually read more text or are they spending more time just fighting with the site layout? I guess the answer doesn't matter if there is an ad on the page.

> How efficient was that increased time spent?

How efficient? The most popular sites on the internet are about _fun_, not _efficiency_ ;-)

Re: HTML is the Web

#313
post #243

Earlier quoted context omitted.

` ` was the correct way in XHTML to do HTML5's ` ` (I think ` ` still works in HTML5 or maybe browsers just don't mind it, but it's not the recommended way.)

Having an unclosed tag somehow seems wrong. What was the reasoning behind this?

Perhaps they made it implicitly self-closing.

Re: HTML is the Web

#314
This is the kind of thing that drove me away from frontend development a few years back. I explicitly ignored the learn-the-javascript-framework-du-jour attitudes.

On a project where I was doing frontend work, I just tried to think about the semantics of html elements and http requests, and reason my way through the tasks from first principles. I really enjoyed doing that actually, and don't regret it. But it didn't teach me angular which is what the frontend people at that company were using at the time, or probably any of the other ones.

I hope to venture into frontend land again, because I think it's a valuable skillset, but I hope the next time I do things will have settled into something a bit more sane. When I find a layer of a technology stack that seems to have been misused or misunderstood, my tendency has been to stop at that point and dive into a rabbit hole trying to understand what is going wrong and how to fix it.

Re: HTML is the Web

#315
The problem is bigger, IMO. Frontend is generally a disgrace for this profession. Biggest projects are a mess that would never see the light of day had they been backend-related. Babel, React, Webpack are maintained far worse than libraries having 10% of their userbase in languages like Python. JS is a fucked up language and we all know it. You couldn't done any worse if you tried to. Until we as a community will not stop tolerating this bullshit, problems will be solved using 2000% more memory/cpu/io than they actually need.

Re: HTML is the Web

#316

Earlier quoted context omitted.

Paradigm 1's security/privacy (WebRTC and webttorrent ip leaking, canvas finger printing) are being compromised in sake of striving for fancy stuff in Paradigm 2. Browser vendors (Firefox, Chrome, Brave) please get your act together to prevent https://nothingprivate.ml

For what its worth, I just tried this on Firefox 67.0.4 and it didn't work. It couldn't find the name I typed after I loaded from a private window.

It didn't work for my friend when done via Chrome on Android, and when I tried it, i got someone else's name in incognito

Re: HTML is the Web

#317
post #243

Earlier quoted context omitted.

` ` was the correct way in XHTML to do HTML5's ` ` (I think ` ` still works in HTML5 or maybe browsers just don't mind it, but it's not the recommended way.)

Having an unclosed tag somehow seems wrong. What was the reasoning behind this?

Because HTML5 is not actually a subset of XML. Every element in XML must be closed, but in HTML5 certain tags (like , , or
) are defined as "void" which means they have no nested content and therefore it's technically improper to close them (although I'd be shocked if any major browsers actually care about that). In other words, an tag does not "open" the definition of a new section of the document the way or do, and it makes no sense to "close" something that was never "open" to begin with.

Re: HTML is the Web

#318

As an experiment, I started https://wordsandbuttons.online/ in plain hand-crafted HTML+CSS+JS (JS for the interactive bits only). Every page is self-sufficient, there are no dependencies, no dynamic data exchange, no HTML generators, - nothing. And it works so well, I don't really want any frameworks now. It's perfectly malleable - I can make every page do exactly what I want it to. It's lean and fast - every page ev…

Congrats for this simple and beautiful website!

I wonder how you manage your overall style, though. Is your design set in stone, do you never change it or fix quirks? If you e.g. change from GitHub to GitLab, would you edit the footer of every single page?

One small suggestion: Please advertise your RSS feed to the browser using the tag. Ideally on every page. Otherwise, visitors of your blog articles (like myself) get the wrong impression that you don't provide a feed, until they go back to the main page and scroll down to the bottom.

Re: HTML is the Web

#319

Earlier quoted context omitted.

Having an unclosed tag somehow seems wrong. What was the reasoning behind this?

Because HTML5 is not actually a subset of XML. Every element in XML must be closed, but in HTML5 certain tags (like , , or ) are defined as "void" which means they have no nested content and therefore it's technically improper to close them (although I'd be shocked if any major browsers actually care about that). In other words, an tag does not "open" the definition of a new section of the document the way or do, and…

That's an arbitrary style choice in the spec. Saying "it's void so never use / " is no more natural than saying "it's void so always use /".

Arguably, it's bad style to use the same syntax for opening a tag as for a void tag, because it forces semantics into the syntax for trivial benefit. With out the "/", your HTML syntax parser now has to include a lexicon of all the void tags, and be updated with spec revisions.

Re: HTML is the Web

#320

I always chime into these articles with the exact same sentiment: this is a business problem, not a developer problem. Developers love simplicity and semantics. But when a UI gets to a certain level of complexity (I say 10 interactions per page) then semantics get hard to maintain or translate. I'm building a recommendation engine for a client right now. Lots of wooshes, whirring and moving parts, a good amount of it…

500kb React tax? You're off by an order of magnitude. React+React DOM is 32kb when gzipped[1].

[1] https://gist.github.com/Restuta/cda69e50a853aa64912d

Post reply on HN