Live data from Hacker News

Write HTML Right

lofi.limo

111–120 of 212 posts

Re: Write HTML Right

#111
post #37
post #25

Earlier quoted context omitted.

You can link it: https://github.com/gildas-lormeau/SingleFile Pretty neat extension!

I was hesitating, thanks!

The remarks by the person who opened #967 are beyond frustrating—and it's frustrating to see your responses to them. People putting stuff into the bugtracker that aren't bugs deserve a harsher response. Don't enable "putting stuff into the bugtracker without clearly articulating a defect [in the form of observed behavior versus expected behavior‡]" to be a viable way to interact with a project. Indulging these kinds of persons' requests for support and freeform banter is harmful in the long run. Giving them the answers that they're looking for even though their questions/comments are out of scope is way too forgiving, and it ends up causing problems for other maintainers when these numbskulls inevitably pop up around other projects and expect the same standard of treatment because they take it as a given that their fripperies are kosher.

‡ including sound, solid reasoning for why the former is incorrect and the latter is correct

Re: Write HTML Right

#112
post #54

Whilst the spec certainly allows you to ignore closing of a whole range of elements, it's not necessarily the wisest of choices to make. The parser does actually get slower when you fail to close your tags in my experience. Unscientific stats from a recent project where I noticed it: + Document is about 50,000 words in size. About 150 words to a paragraph element, on average. + Converting the entire thing to self-clo…

I can't verify your numbers. As far as I can tell, loading a ~900,000 word document with no other differences than including or excluding

has about the same load time, though there's too much variance from load to load for me to really give definitive numbers.

Are you sure you converted it properly? I'd expect those kinds of numbers if your elements were very deeply nested by mistake (e.g. omitting tags where it's not valid to do so), but I don't see why leaving out

should be so slow.

Try these two pages:

https://niconii.github.io/lorem-unclosed.html

https://niconii.github.io/lorem-closed.html

Re: Write HTML Right

#113

XML is beautiful and clean, and I prefer to write full closing tags.

Of course, of course; but here they are talking about HTML (i.e., about HTML5), not about XML.

I've given up to try and educate XML heads that XML is just a proper subset of SGML, just as HTML is originally, and mostly still, an SGML vocabulary. Idk what people are talking about in this thread (seems to be about each one's personal preferences and wildly speculative assumptions about backtracking when in reality both SGML and WHATWG are deterministic); while there is exactly one reference to WHATWG at this time.

Re: Write HTML Right

#114
If you must write html by hand this seems nice. But I would never actually write html by hand anymore. For most web apps you write more tags than text. I love slim because it was designed with that in mind. There is no overhead to writing tags, and just a little for writing text. Which is the right way to go for web apps.

Re: Write HTML Right

#117
post #65

Earlier quoted context omitted.

> For some prettier mark up. But then if you run it through Prettier it'll add all the closing tags for you :)

If you’re running it through a processor, why it just write markdown and call it a day?

Is there a standard definition for the "Markdown" -language?

There are several for HTML different versions and it is standardized that you can omit some closing tags and some tags altogether.

The benefit of writing in a standardized language is that later you or anybody can run tools against your sources that check for conformity.

So that is why I prefer HTML. But I would like to hear your opinion on what is the best mark-down dialect currently?

Re: Write HTML Right

#118
post #27

Earlier quoted context omitted.

It’s funny you bring this up because while I have joined the Tables For Layout Are Considered Harmful club, I never really have heard a completely convincing argument on why tables have this bad rap. I think it’s mostly because, semantically, tables don’t make sense for layout, but back in the days before frameworks such as Foundation and Bootstrap (and more recently native CSS3 mechanisms), tables with invisible bor…

The "Tables are Harmful" club largely came from the crew who thinks HTML carries lots of semantics and that if you don't use the Blessed Tags that carry those semantics you're doing Bad Design. The rational evidence in favor of this claim has always been weak. The "div" tag basically finished it off. The people who use HTML "semantically" have always been dwarfed by the people just making it look good on the screen,…

Obnoxiously bad take.

> Google info boxes[...] have nothing to do with the semantic web and everything to do with Google throwing a crapton of machine learning and humans at the problem of parsing distinctly non-semantic HTML until they cracked the problem

This is verging on /r/SelfAwarewolves material.

Re: Write HTML Right

#119

Earlier quoted context omitted.

If you’re running it through a processor, why it just write markdown and call it a day?

Is there a standard definition for the "Markdown" -language? There are several for HTML different versions and it is standardized that you can omit some closing tags and some tags altogether. The benefit of writing in a standardized language is that later you or anybody can run tools against your sources that check for conformity. So that is why I prefer HTML. But I would like to hear your opinion on what is the best…

Yes, CommonMark is a standard with implementations in many different languages.
Post reply on HN