Hacker News new | ask | show | jobs
by shadowmint 4353 days ago
Hm.

The point of these compile-to-html languages (eg. markdown) is that you're abstracting away from the display formatting as much as possible.

It's easy to say that you can just use HTML as content-only and style it using CSS, but the reality is that HTML is primarily a display format; it's pretty much unavoidable having classes, ids & DOM node structure in HTML that govern display behavior.

By abstracting concepts (paragraph, heading, list, etc) out, you can render them as components however you like into the HTML. Which means if you decide to change how they're rendered, you can do it all at once by editing the template.

Markdown & it's kin are certainly not perfect, but I'm pretty sure writing directly into HTML for your content is a generally really terrible idea.

(that said, with web components we will be able to do this directly in HTML by creating custom data-driven tags, so maybe that's the future. ...but it's not quite here yet)

1 comments

Show me the part of Markdown (and its kin) that allows me to distinguish why the text is appearing in (or, rather, marked up in a manner that normally translates to) italics or bold (hint: you can't assume stress, and simply holding to current conventins is only good for ephemera). Where do the language tags for foreign words and phrases go? Are asides, callouts and infoboxes really the same things as blockquotes? HTML may not quite be SGML, but it is an awful lot richer than Markdown (and its kin) even if no attention is paid to styling. (I haven't used a class or id whose only purpose was styling in a decade. They either have a relationship to the document structure or they don't exist.)