15 ms·
Markdown is a convenient but deeply limited markup language with only a small subset of html's features. And yes, limitations are good because we want document
by bccdee 4y ago
Markdown is a convenient but deeply limited markup language with only a small subset of html's features. And yes, limitations are good because we want documents not web apps, etc, etc, but I mean "images can't have captions" limited, "navigation bars don't exist" limited. Actual important features of html don't exist in markdown, which is why almost every markdown platform ends up adding extensions and shortcodes. Why use markdown at all? Just use html.
"But html isn't style-agnostic" yes it is. CSS isn't style-agnostic. Instead of a markdown browser, how about a browser with a fixed stylesheet and no js? You don't even need a browser for that, that could just be a userscript that gets plugged into an existing browser. It'd break non-compliant websites that require javascript or custom css, but so would a markdown browser. Most people wouldn't write content for it, but most people wouldn't write content for a markdown browser either.
"But html is cluttered" it doesn't have to be. This is a valid webpage:
<!doctype html>
<title>Page Title</title>
<h1>Page Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Ut ac lorem ut massa euismod vestibulum.
<p>Nullam rutrum blandit eleifend. Aenean a varius diam.
Morbi sodales velit nunc, vel vestibulum lorem tempus sodales.
Personally, I prefer writing in markdown, but that's no reason to insert a markdown renderer into browsers. HTML can already be as sleek and readable as you want. If we added a new type of markup for anybody with a personal preference, we'd never stop.
- fiedzia 4y agoPlain HTML would be great, its just browsers holding it back. Without CSS, it looks unacceptably ugly.
- SoftTalker 4y agoYou can get good looking "plain" html (i.e. readable margins, linespacing, fonts and text size) with a very tiny amount of CSS.
- nwienert 4y agojust hit reader mode
- fiedzia 4y agoMy browser doesn't have one, and even if it did the point is that it should look good without any effort.
- nwienert 4y agoI guess my point is browser all do easily provide (some with extensions) exactly this already - a mode where it's just HTML with some standard readable CSS already. You can also do default user stylesheets. This is a positive point for things being pretty well set up today.
- dsego 4y agoImho, reader mode should've been the default stylesheet from the very beginning.
- dsego 4y agoAgreed, classless css to the rescue, eg https://newcss.net/ https://newcss.net/
- robinsonb5 4y agoThe fatal flaw of HTML (and XML for that matter) is that the tags have the same visual weight as the text they're delimiting, which makes for a sense of clutter even in your minimal example. Markdown really scores here, by having a pleasing plain text representation as a goal from the outset, and I've love to see it used more widely for web pages. I'd also love to see it more widely used for offline reading, too - the help files in an application really shouldn't need to invoke a web browser to view them when a lightweight markdown viewer would do the job. Not that there is a lightweight markdown viewer, mind you!
- 5560675260 4y ago> tags have the same visual weight as the text they're delimiting IMO this issue should and can be easily solved by editor/viewer by rendering tags with lower contrast.
- robinsonb5 4y agoYes, that's a perfectly viable workaround, but it's still a band-aid that requires expending resources that wouldn't need to be spent if the markup method had been better chosen for readability. (To be specific, I believe the angle-brackets are the main culprit.)
- ElemenoPicuares 4y agoMarkdown is undoubtedly more readable, but HTML can be more readable than most people make it. And considering that the ultimate goal is to wind up with a layed-out, styled document, its capabilities in that regard are just plain-old more important, especially since markdown isn't going to replace WYSIWYG editors any time soon, and almost everybody who needs to know HTML can learn it relatively easily. Browsers collapse white space by default, so you've got a lot of flexibility with its formatting: <!doctype html> <title> Page Title </title> <h1> Page Title </h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac lorem ut massa euismod vestibulum. <p> Nullam rutrum blandit eleifend. Aenean a varius diam. Morbi sodales velit nunc, vel vestibulum lorem tempus sodales. --or-- <!doctype html> <title> Page Title </title> <h1> Page Title </h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac lorem ut massa euismod vestibulum. <p> Nullam rutrum blandit eleifend. Aenean a varius diam. Morbi sodales velit nunc, vel vestibulum lorem tempus sodales. I get why many developers like this idea... Web developers are responsible for implementing the complex user-facing parts, and their primary weapon is text: doing extra work sucks, and when you're a hammer, everything looks like a nail. But developers are not designers, and design not being left to developers in mature organizations is no accident. Absolute, deliberate, limiting simplicity is always an attractive argument if you dismiss the value of, or maybe don't even understand the reason for the complexity. I won't deny the advantages of reader-view-level simplicity in web design: it's easier to visually parse, more performant, and easier to navigate compared to most web pages, similar to how books compare to magazines-- but about 225 million people per year in the US read magazines and I assure you most of them would not choose to have textural printouts in lieu of their current form. While people like having the option of a uniform, grey, easily visually parseable mode to view webpages, that's probably not what they want even most of the time, let alone as a deliberate limitation.
- SPBS 4y agoExactly what I was thinking, by omitting the <html> <head> and <body> HTML can be quite concise [1]. Additionally the closing </li> can be omitted from lists and <li> barely a step over using - for bullet points. The worst part about HTML is the links, though. Anchor tags are awful. Having to repeatedly type <a href="..."> and closing with </a> is wayyy too boilerplate much for for something that is simply surrounded with [square](brackets) in markdown. [1] I go to https://meiert.com/en/blog/optional-html/ https://meiert.com/en/blog/optional-html/ for reference.
- MrVandemar 4y agoI have the opposite problem. HTML <a href> links are consistent with the rest of the language. <a href>Something</a> makes the same kind of sense as <em>something</em>. But markdown? I'm always forgetting the order of the (link)[text] or [link](text) or [text](link) or (text)[link]. It's just something that's invented, and not consistent with the rest of itself.
- chrismorgan 4y agoAnd, for the specific syntax: parentheses to surround the URL is jut bad because parentheses are URL code points, so you can’t just insert regular serialised URLs in Markdown in all cases. (See https://news.ycombinator.com/item?id=33340097 https://news.ycombinator.com/item?id=33340097 for more explanation.)
- dandy23 4y agoThe org-mode version is better in my opinion. Either [[link]] or [[link][text]]. Only uses square brackets and the optional text comes second which makes logical sense.
- thrown_22 4y agoI've yet to have anyone explain why markdown with it's dozen flavours is better than HTML2: https://datatracker.ietf.org/doc/html/rfc1866 https://datatracker.ietf.org/doc/html/rfc1866 We broke a weird little markup language into something it was never meant to be because the last tower of crap got too high and collapsed on itself. Now a webpage is html+css+javascript+a dozen frameworks. People are sick of it and want something better. Well HTML2 is better. Just HTML2, nothing else.
- paulddraper 4y agoWrite a list in HTML and write one in Markdown. The difference in legibility is pronounced. Especially if you don't want weird whitespace things.
- chii 4y agoBut why does it matter what the underlying code looks like to the end user? Nobody complains that the assembly code that runs their application is cluttered and illegible.
- nxpnsv 4y agoYet people tend to choose python instead of assembly when introducing coding to a friend. It is easier to write, in part because it’s easier to read.
- paulddraper 4y agoIt doesn't. But it matters to the author. Assembler is not a popular language.
- bccdee 4y agoI don't find this illegible in the least. <ul> <li> Item one <li> Item two <li> Item three <li> Item four </ul> It has advantages over markdown lists, too: You never need to mess with semantic indentation to add additional paragraphs to a given line, and you don't have to manually number ordered lists the way some markdown flavours ask you to.
- krick 4y agoUh, yeah, that's a valid web-page, but I don't see how that counters "html is cluttered" statement. This is cluttered. It… just is. I know some people who suffered some mind deformation in academia and now claim LaTeX is the perfect markup for blogs, but I don't think I've encountered the same for html until now. I mean, does somebody really compose text in html?! Markdown is deeply limited, that's true, but I often think that there is just a tiny bit of syntax lacking to make it just fine. Some actually is implemented in software like Pandoc or RedCarpet, there are a couple of ways to make tables (some better than others), LaTeX can be employed for formulas, some implementations have checklists, strikethrough, etc. It's just poorly standartized — and the spirit of original proposal (and misleading name) is at fault here as well, since later attempts to invent a standard mean very little when there is a dozen of different common implementations and not a single one is reasonably complete. By the way, the fact that HTML was supposed to serve as an addition to Markdown doesn't help: you just cannot allow people to submit arbitrary HTML everywhere where something like Markdown is needed. To use it in comments on a forum you need to fully parse it anyway, explicitly enabling or disabling different features of some ubiquitous "full implementation". Obviously, you cannot make an atrocity like a modern landing page in Markdown+. But… ok, I shouldn't be judgemental and claim such atrocities shouldn't exist — they can, but most blogs, forums (such as this one), etc. — really could have been just "viewer programs" of some standardized format, much more restrictive than HTML+CSS+JS, but a little less limited than Markdown. All of this isn't very much related to the original topic, but seriously, I dream of some better version of Markdown someday becoming a de-facto standard markup language for all forums, messengers, blogging engines, whatever the general name for Jira is… You know what I mean. I don't really have a solution, it just really feels like there shouldn't be that many additional features. A couple more of emphasis options, a couple less ways to do the same thing (I mean, it's stupid to convert all of */-/+ to the same <li> elements), colors, better image embeddings (with captions), sidenotes, better ways to handle formulas (there are enough dedicated literals in Unicode to construct most simple formulas without the need for LaTeX, but they still need to be parsed to be rendered pretty) and simple UML-like stuff… I'm pretty sure the comprehensive list of features for 6-σ usecases cannot be THAT huge. Big, yes. Not endless. And most features surely have some "plain-text" (or very light special syntax) representations. I realize that it was pretty much the intention behind HTML + CSS. But HTML + CSS stopped being that a very, very long time ago. 30 years have passed. By now, we should have a little better sense of what's needed to write & render most texts.
- minhmeoke 4y agoFor a static document markup language, Djot does a rather good job: https://github.com/jgm/djot https://github.com/jgm/djot It's very similar yet much fuller-featured than commonmark, with support for definition lists, footnotes, tables, several new kinds of inline formatting (insert, delete, highlight, superscript, subscript), math, smart punctuation, attributes that can be applied to any element, and generic containers for block-level, inline-level, and raw content. In addition, it resolves ambiguities in the commonmark spec and parses in linear time with no backtracking. Further discussion lower in this thread: https://news.ycombinator.com/item?id=33553293 https://news.ycombinator.com/item?id=33553293 Quickstart for Markdown users: https://github.com/jgm/djot/blob/main/doc/quickstart-for-markdown-users.md https://github.com/jgm/djot/blob/main/doc/quickstart-for-mar... Some more in-depth examples, showing how Djot would be rendered into HTML: https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html https://htmlpreview.github.io/?https://github.com/jgm/djot/b...
- inopinatus 4y ago> only a small subset of html's features. On the contrary - Markdown is essentially a superset of HTML, so unless you're using a renderer that strips it from the input, you can have the best of both worlds. This property was super useful for a lightweight CMS I threw together a few years and which is still used by the original customer today. 99% of what they need to render is easily authored in Markdown, and this further helps ensure a commonality of style and device portability.
- bobmaxup 4y agoFlavors of Markdown might be a superset, but as it is normally used, I don't think many would say that Markdown has all the abilities of HTML.
- deleted 4y ago[deleted]
- evv 4y agoThe original Markdown spec is very clear that HTML is allowed. So MD itself is absolutely a superset of HTML https://daringfireball.net/projects/markdown/syntax#html https://daringfireball.net/projects/markdown/syntax#html But in practice people mostly use MD variants, such as the "GitHub Flavored Markdown Spec" which may have some limits on HTML usage https://github.github.com/gfm/#html-blocks https://github.github.com/gfm/#html-blocks
- bccdee 4y agoThe original markdown parser supported html because it was basically just a preprocessor that added some syntactic sugar to html. The proposal here isn't just "what if browsers had a markdown preprocessor" (although I also think that would be questionable), but "what if browsers limited content down to only markdown, so that the web was all just clean, style-agnostic documents," and that clearly requires that markdown not support arbitrary html.
- toastal 4y agoThat would be the worst world. I love that we have semantic and accessible elements and Markdown is pretty bad in both those categories.
- martyalain 4y agoIt's said that the father of LISP, John McCarthy, lamented the W3C's choice of SGML as the basis for HTML : « An environment where the markup, styling and scripting is all s-expression based would be nice. » The {lambda way} project could be an answer, small and simple: http://lambdaway.free.fr/lambdawalks/ http://lambdaway.free.fr/lambdawalks/ In lambdatalk such a HTML code <h1>Page Title</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac lorem ut massa euismod vestibulum. <p>Nullam rutrum blandit eleifend. Aenean a varius diam. Morbi sodales velit nunc, vel vestibulum lorem tempus sodales. is written like this _h1 Page Title _p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac lorem ut massa euismod vestibulum. _p Nullam rutrum blandit eleifend. Aenean a varius diam. Morbi sodales velit nunc, vel vestibulum lorem tempus sodales. And you can also compute 3x4 writing {x 3 4} or compute the factorial of 100, compute a Fast Fourier Transform, draw complex graphics, ... it's a true programming language with a coherent syntax, unlike Markdown.