Live data from Hacker News

HTML is the Web

petelambert.com

291–300 of 341 posts

Re: HTML is the Web

#291
post #157

Earlier quoted context omitted.

> It's astounding the number of interview candidates who are super-fluent in JS but can't tell you to save their lives why it's a bad idea to put a click handler on a div. Go on?

Putting a click element on a div is transparent to accessibility systems. And no, it isn't possible to consider an element with an onclick the same as a button, because events bubble, which means the element with the event listener isn't necessarily the element being watched for a click. IIRC there even used to be a "good practice" where people would attach a single click handler at the root and use it to dispatch ev…

React does that, they call it synthetic events, but it's hidden from the developer. In jQuery it used to be called event delegation, made it easy to handle events on dynamic elements without the need to constantly attach/detach handlers.

Re: HTML is the Web

#292

Earlier quoted context omitted.

I am not protesting the idea that a site should work without JS - quite the opposite, I accept that active content and user interaction requires JS (as much as I loathe the language). What I am protesting, however, is that graceful degredation doesn't happen. The entire site either breaks or blocks you from viewing static content unless you enable JS. Why am I prevented from viewing a product's information page befor…

The dynamic dom frameworks (and webpacks) have a tendency to encourage moving everything into javascript. Generally this means that enabling gradual degredation requires building most things twice, once in static form and again for when vue et al have been loaded. Separating the two takes significant time and effort, which also introduces extra surface area for bugs and odd interactions. It is expensive to build this…

> an increasingly rapid arms race for engaging design

For us, the arms race is that other one about getting code to execute on people's machines, including the virtual ones, versus preventing that. The mere existence of good code that is worth running makes it a hard problem. More of that just makes it more pressing even if not actually harder.

> Ultimately all website are optimised for their target audience

Ultimately all audiences are being optimized for the ideal website which shares its ideal viewing conditions with websites that are being used against the users (i.e. code runs even though we don't know or explicitly trust the authors or their employers or really anyone around it).

Re: HTML is the Web

#293
> Search engines need to read your content, not enjoy your swoopy animations or fancy gradients.

Great way to get your audience ("back end of the front end" engineers and full-stack devs) on side, by trivialising the work we do as adding pointless fluff. Actually in most of my work, the JavaScript is the essential part of the app, and whether it is perfect HTML or not is not a high priority.

Re: HTML is the Web

#294

I feel like many people here are misreading the OP as anti-framework and I didn’t read it that way at all. Sure, there is an element of, “you don’t need to immediately grab the nearest framework as the solution to _every_ problem”, and that’s something I personally agree with. But the point I think the author is trying to make is that whether you do or don’t use a framework, you need to understand the fundamentals. T…

> The fundamental language of a browser has always been HTML. JavaScript and CSS are great and came along in due time but before all that there was HTML.

IMHO in the sense of fundamentalism all major frameworks tried to reimplement and resemble HTML (or its dialect) and browsers on existing HTML and browsers, which eliminated divergence of platforms for developers, relieving them from dealing with variations of users’ environment, i.e. the differences of browsers and HTML implementations. It was a transfer of control from client end to server end, from users to websites, implicitly.

Re: HTML is the Web

#295
post #290
post #5

A Web page is a document. No it's not. It never was. Even a long time ago when websites were static things rendered by the browser once and then left alone there was always a tree of nodes underlying everything. The only thing that's changed in the past three decades is that now when we make websites and web apps we often ship a little JS application that lets the user modify the underlying tree. That's what the web…

Re: [A Web page is a document.] No it's not. It started out that way, but grew to TRY to replace GUI's, Flash, etc. We need three different standards: one for documents (HTML may be good enough); one for media, art, and games; and one for desktop-like GUI's. There may be some overlap between these, but the one-size-fits-all of HTML/CS/JS has been a big messy time-sink where otherwise simple UI tasks take rocket scien…

We already have 3 different standards: HTML, CSS, JavaScript.

These are low level enough, and powerful enough that you can build document, multimedia or application frameworks on top of them. Simple UI tasks don't take rocket science, they take a proper understanding of those three standards, and a lot of discipline.

Re: HTML is the Web

#296
post #65

> In descending order of importance it's the HTML, the CSS, and the behaviour. I would argue the behavior is more important if the website does anything else other than just show articles. A beautiful site with no behavior is useless; an ugly site with functioning behavior is not.

Behavior and features are two different things. Behavior is more about basic interactivity, like clicking or scrolling. Even websites that just show articles require some behavior to work.

Re: HTML is the Web

#297

No, HTML was the web. We are building web applications now with Javascript. I hope that Web Assembly will end the need to write any HTML tag ever again in our web apps.

Which GUI library would you use instead of HTML?

Re: HTML is the Web

#298

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…

I feel like I'm going to be in a huge minority here but I am one of those developers that builds websites that won't load without js. Hear me out though. I primarily work with ecom, and we build highly dynamic sites in an increasingly rapid arms race for engaging design. Before vue I worked with jQuery like everyone else, controlling the dom manually to react to changes in application state. Those were dark days. Now…

> So, sorry if my site doesn't load without JS, but it's not about the ads. The web isn't just document display anymore, everything is an app.

Hands down, this was the comment I was looking for to agree with.

Re: HTML is the Web

#299
post #243

Earlier quoted context omitted.

> un-learning ` ` wait what ?

` ` 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?

Re: HTML is the Web

#300

Earlier quoted context omitted.

I mainly work in React. You can write semantic HTML up to a point. Things like article, section, header, footer, etc. are supported. But if you wanted to make up your own tag and expect it to act like a div, I think React would complain that it doesn't understand that tag. That's what I meant by "the promise of the semantic web". As I originally understood it, you could make your own custom tags that describe the int…

That does not match how I think of the semantic web at all. For example: > make your own custom tags that describe the intent of the document If you make up your own tags for everything then to a visitor (human, bot, indexer or otherwise) it describes nothing, since those tags only have that meaning on your site (and worse, they have different meanings on other sites). Semantic web or RDF or Linked Data or whatever y…

I looked up what the semantic web actually is and you're right. But at the same time, I was surprised to find that it's all properties! The tags are all divs and spans!

I guess the semantic web is orthogonal to this discussion. My apologies. I guess it's another buzzword that was thrown around for a time. In that case, assume I meant web components whenever I said semantic web.

Post reply on HN