Ideally, we would write everything in plaintext, but it doesn't support even the most basic features offered by typesetting (bold, italics, etc.) or hypertext (embedded links), so we turn to markup languages at the expense of readability.
Markup syntax like markdown, asciidoc, reStructuredText, etc. strive primarily to preserve readability with the least obtrusive syntax, and with a smaller learning curve (at least for the most basic usage).
So why use it instead of HTML? Like you, I typically write HTML in HTML, but often use asciidoc for other purposes (documentation, recipes, quick notes, etc.), because:
- One source document can output to multiple formats, like XHTML, LaTeX, PDF, DocBook, EPUB, Man page, etc. It's even trivial to output to a specific HTML DOCTYPE. That's pretty neat!
- Diffs are far more readable when not swimming in markup soup.
- HTML is overkill for many purposes. In fact, lightweight markup has its roots in email/newsgroup markup. HTML email is still a compatibility nightmare. Wouldn't it be great if a new standard for rich text email was developed, based on something as simple as markdown? It would be trivial to support it in webmail interfaces and the source would still be readable in plaintext email clients or if the sender went overboard with style choices.
- Archivability. Many old HTML documents render poorly in modern browsers, mainly due to style choices that seemed sensible at the time. Lightweight markup focuses more on the content and discourages going off on a stylistic tangent you may regret later. In other words, it does a good job of separating content from presentation, so your source documents will always remain readable and transform to something readable with relatively few tweaks in external stylesheets or configuration files.
Because it's easy to learn without getting lost in the arcane details of validation and compatibility, it's understandable why it's gaining popularity.
Markup syntax like markdown, asciidoc, reStructuredText, etc. strive primarily to preserve readability with the least obtrusive syntax, and with a smaller learning curve (at least for the most basic usage).
So why use it instead of HTML? Like you, I typically write HTML in HTML, but often use asciidoc for other purposes (documentation, recipes, quick notes, etc.), because:
- One source document can output to multiple formats, like XHTML, LaTeX, PDF, DocBook, EPUB, Man page, etc. It's even trivial to output to a specific HTML DOCTYPE. That's pretty neat!
- Diffs are far more readable when not swimming in markup soup.
- HTML is overkill for many purposes. In fact, lightweight markup has its roots in email/newsgroup markup. HTML email is still a compatibility nightmare. Wouldn't it be great if a new standard for rich text email was developed, based on something as simple as markdown? It would be trivial to support it in webmail interfaces and the source would still be readable in plaintext email clients or if the sender went overboard with style choices.
- Archivability. Many old HTML documents render poorly in modern browsers, mainly due to style choices that seemed sensible at the time. Lightweight markup focuses more on the content and discourages going off on a stylistic tangent you may regret later. In other words, it does a good job of separating content from presentation, so your source documents will always remain readable and transform to something readable with relatively few tweaks in external stylesheets or configuration files.
Because it's easy to learn without getting lost in the arcane details of validation and compatibility, it's understandable why it's gaining popularity.