Live data from Hacker News

HTML is the Web

petelambert.com

231–240 of 341 posts

Re: HTML is the Web

#231
post #78

Earlier quoted context omitted.

Opening can of worms: did you serve them with any of the available XML MIME types? If not they worked simply because of the bug in the browsers (SHORTTAG means a different thing in HTML compared to XML) and all XHTML code served with HTML MIME type would be littered with ">" if browser treated it right ;)

br is an empty element ( https://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Stric... ), so should work fine

In XHTML. No browsers treat documents (no matter the doctype) as XHTML unless the proper MIME type is used. Without it your XHTML markup is treated as SGML application (which HTML is) and thus means completely different thing. See http://jkorpela.fi/html/empty.html for the details.

Re: HTML is the Web

#232
post #191
post #50

Earlier quoted context omitted.

JS didn't suplanted it from day to night. It was Steve Jobs who killed Flash, not letting Adobe from conquer their new iOS platform. They tried it so hard, even on Android back then, but they failed to deliver something solid. Eventually, both Google and Apple released their SDKs to develop apps, way more solid and faster than running a Adobe Flash player layer on top of the OS. This article shows the jump on technol…

Flash was already mostly dead by the time the iphone came. Adobe was not investing much into it and it was mainly being used to show videos.

I don't think so. Flash was strong in three scenarios: corporate websites, games and advertising. The agency I worked for made 95% of its revenue from Flash work, and most of the agencies in Barcelona, Madrid did the same.

Re: HTML is the Web

#233
post #231

Earlier quoted context omitted.

br is an empty element ( https://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Stric... ), so should work fine

In XHTML. No browsers treat documents (no matter the doctype) as XHTML unless the proper MIME type is used. Without it your XHTML markup is treated as SGML application (which HTML is) and thus means completely different thing. See http://jkorpela.fi/html/empty.html for the details.

although nowadays there's HTML5, which isn't an SGML application. It allows (but ignores) the closing slash for void elements (like
), and specifies error recovery for non-void elements that treats it as if the slash didn't exist.

Re: HTML is the Web

#234
post #3

I pretty much agree with all the article. Back in 2001, when Web Standards were on the rise, people used to validate their HTML code. It was shown as a badge of prestige when you had 0 errors. Semantic HTML was a hot topic and most of the developers I worked with were a sort of HTML taliban. But the popularity of frameworks helped developers forget the basics and concentrate more on learning how to get the most out o…

All my webpages had the valid xhtml badge! https://commons.wikimedia.org/wiki/File:Valid_XHTML_1.0.svg I still have a hard time un-learning ` `

>I still have a hard time un-learning ``

Oh boy, I'm supposed to stop doing that? Yikes ... when did that happen?

Re: HTML is the Web

#235

Earlier quoted context omitted.

I’ll bite: Why is it bad to put a click handler on a div? Because we’re losing the semantic content of the markup?

Because there's already an element for that. Putting a click handler on a div is a hack. In a clean (from scratch) dev situation, when would it make sense to use the div option?

People have been putting event listeners on div long before any framework was around. Tons of libraries and documentation show how to attach a click handler to a div (ex: https://api.jquery.com/click/). I can think of some cases... maybe the div is contenteditable and I want to trigger some analytics. Maybe I want to listen to all the children of a container rather than apply expensive listeners all over. Do you put button tags around all your tooltips? You might end up making your HTML look right, but now you are jumping through hoops to make it not look like a button. As with all things, it's naive to say "never do something."

Re: HTML is the Web

#236

Earlier quoted context omitted.

That's more literally the case with web assembly. With Vue, I guess I still see it as a form of transpilation.

WebAssembly does not replace CSS or HTML unless you render everything to a ` ` which would loose most of the benefits of the web.

I understand that. But wasm sure does fit the description of "compilation target for the web".

Re: HTML is the Web

#237

Earlier quoted context omitted.

Maybe that would make it better, maybe not. It's hard to get everyone on the same page working together on a platform that noone ownes. If it was easy, there would have been several protocols in use already. I am content with what we got and are happy about it. I think it works pretty great after all.

I'm not so happy with it, since I'm tired of trying to figure out which domains to allow javascript from when practically every page has a list of a dozen or more. I'm tired of trying to run pages that don't work with any of the browsers I have access to on linux, despite html being a standard. The whole paradigm seems broken to me. It just feels like a monumental kludge.

> any of the browsers I have access to on linux

I use linux as well and I have yet to find a webpage that doesn't work with Firefox and Brave.

Maybe you shouldn't block javascript and instead block trackers and ads. There are a lot of tools to do that like uBlock Origin, pi-hole, privacy badger etc.

Javascript is used by pretty much all websites today to do mostly other stuff than tracking. Why are you blocking it if I may ask?

Also, I am very curious (I really am), what websites do you visit daily? I'm sure at least some of them are depending on javascript and couldn't be solved with html+css alone?

Re: HTML is the Web

#238

The new approaches to HTML/CSS run directly counter to the specs sometimes. Take Bulma for example. They provide styles for titles and subtitles, but their examples use h1 elements. See: https://bulma.io/documentation/elements/title/ Why is that a problem? This is explicitly addressed in the HTML 5.2 specification. > h1–h6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unl…

Or perhaps the spec is out of touch with reality...

Re: HTML is the Web

#239

Unpopular opinion... but I think this is a too limited view of the web. My contrary opinion is that the actually important feature of the web is the URL, and the important feature of the browser is that it provides a sandboxed platform for running untrusted code without a builtin "walled garden moral police". It would be nice if operating systems would be exactly that, but for some reason "commercial" OS vendors are…

The web browser _is_ the "safe" sandbox. Your dream of competing OS vendors coming together to build a standard UI platform makes no sense whatsoever. The current state of web apps is mostly a factor of developers being willing to do any amount of work whatsoever to avoid having to learn how to do things differently than they already know (ie, writing good native apps for multiple platforms, which would require learning multiple frameworks, so instead they create their own abstracted framework within a sandbox.

Re: HTML is the Web

#240

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.

What do you mean when you say "should"? In an ideal world? Maybe. As it stands though, there is basically zero incentive to do so and quite a few incentives not to. Analytics, ads, referral networks etc. All of these require JS (at least the most popular solutions of the day) and if non of this works, what exactly is the reason to show you the page?
Post reply on HN