Comparison of lightweight markup languages
From Wikipedia, the free encyclopedia
This article provides a basic feature comparison for several lightweight markup languages. See list of lightweight markup languages for relevant links.
Contents |
[edit] Comparison of Syntax
[edit] Text/font-face formatting
Language | Bold | Italic | Monospace (teletype) | Notes | |
---|---|---|---|---|---|
Almost Free Text | _bold text_ |
''italic text'' |
|monospace text| |
Formatting will not occur across line breaks unless the first formatting character is the first character on the line. | |
BBCode | [b]bold text[/b] |
[i]italic text[/i] |
[code]monospace text[/code] |
Formatting works across line breaks. | |
Markdown | **bold text** or |
*italic text* or |
Non-monospace text
|
Markdown doesn't use bold and italic tags, but rather em (typically italic) and strong (typically bold) tags.Monospace text is created by indenting that line 4 spaces or one tab character, or enclosing text in backticks: |
|
o7aCode | '''bold text''' |
''italic text'' |
°°°
|
o7aCode uses em (typically italic) and strong (typically bold) tags.All attributes of all markups can be filled in. |
|
reStructuredText | **bold text** |
*italic text* |
``monospace text`` |
||
Textile | *bold text*
or |
_italic text_
or |
@monospace text@ |
Textile uses em (typically italic) and strong (typically bold) tags
on single symbols, and |
|
Texy! | **bold text** |
*italic text* or
|
`monospace text` |
Texy uses by default em (typically italic) and strong (typically bold) tags. It is possible to configure library to use another tags. |
|
Wikitext | '''bold text''' |
''italic text'' |
<code>monospace text</code> |
[edit] Section headers
Language | Format | Notes |
---|---|---|
Almost Free Text | * Level 1 Header
|
Up to 4 levels |
BBCode | Does not support section headers | |
Markdown | # Level 1 Header
|
You can optionally "close" the #-style headers with an equal number of #'s. The #-style headers support up to 6 levels. The = and - style headers support only the two shown. |
o7aCode | = Level 3 Header =
|
The title first level can be set (by default : 3). |
reStructuredText | Chapter 1 Title
|
Any of the following characters can be used as the "underline": = - ` : ' " ~ ^ _ * + # < > . The same character must be used for the same indentation level and may not be used for a new indentation level. |
Textile | h1. Level 1 Header
|
Up to 6 levels |
Texy! | ### Level 1 Header
|
You can optionally "close" the #-style headers with an equal number of #'s. The #-style headers support up to 6 levels. The underlined style headers support four levels (### *** === ----). Real levels are calculated dynamically. |
Wikitext | == Level 2 Header ==
|
= is available for level 1 header, but its use is discouraged in Wikipedia (reserved for page title). More = are possible, up to 6. |
[edit] Link Syntax
Language | Syntax | Notes |
---|---|---|
Almost Free Text | [Link text (http://www.example.com)] |
Also has support for targeting references within the same text, not just URLs. |
BBCode | [url]http://www.example.com[/url]
|
Some BBCode implementations can auto-parse URLs as well and convert them to a elements. |
Markdown | [Link text](http://www.example.com "optional title attribute")
or |
Allows for an optional title attribute. |
o7aCode | [http://o7aCode.net/ :: official website of o7aCode :: en]o7aCode[/]
|
All attributes can be filled in (href, title, lang ...). The last example allows to make a link to a wikipedia article. |
reStructuredText | `Link text <http://www.example.com/>`_ |
Can also be done in a non-embedded format which may be seen as more readable. |
Textile | "Link text (optional title attribute)":http://www.example.com
or |
Allows for an optional title attribute. |
Texy! | "Link text .(optional title)[opt. class or ID]{opt. style}":http://www.example.com
or |
Texy! modifiers allows for an optional title attribute, CSS classes, ID, inline style and HTML element attributes. Example: "Link .(title)[class#id]{color: blue;rel:nofollow}" |
Wikitext | [[Internal page]]
|
Wikitext can auto-parse URLs as well and convert them to a elements. |
[edit] Comparison of language features
A lot of this was taken from http://bluebones.net/2005/02/humane-text-formats/
Language | HTML export tool | HTML import tool | Tables | Link titles | class attribute | id attribute | Exportable formats | License |
---|---|---|---|---|---|---|---|---|
Almost Free Text | Yes | No | No | No | No | No | HTML, LaTeX, lout, DocBook, RTF | Clarified Artistic License |
BBCode | No | No | No | No | No | No | ? | ? |
Markdown | Yes | Yes | No | Yes | No | No | XHTML | BSD-style |
o7aCode | Yes | Yes | No | Yes | Yes | Yes | XHTML HTML ... | ? |
reStructuredText | Yes | No | Yes | No | Yes | auto | Latex, XML, PseudoXML, HTML | Python |
Textile | Yes | No | Yes | Yes | Yes | Yes | XHTML | Textile License |
Texy! | Yes | Yes | Yes | Yes | Yes | Yes | XHTML or HTML (always valid wellformed code) | GNU GPL v2 License |