Learning the Markdown Syntax
What is Markdown?
Markdown is a tool that converts simple text characters into HTML. It was created to facilitate writing on the web. It is very similar in purpose to BBCode, being created later (in 2004).
Unlike BBCode, Markdown aims to avoid the use of tags wherever possible, as if the writing was just plain text. So generally Markdown writing is even simpler than BBCode, although it is more focused on text formatting.
Markdown was created by John Gruber with the audacious goal of becoming the writing format for the web. However, the idea was never to replace HTML, rather Markdown has always functioned as a complement, something that works alongside HTML, because everything that cannot be written in Markdown can be written in HTML.
Markdown’s popularity has grown a lot over time, to the point where major platforms like Github, Reddit and Stack Exchange use variations of Markdown in their internal forums. Messaging applications such as Whatsapp have also incorporated Markdown through the use of special characters.
Markdown vs BBCode
In general, Markdown is not necessarily a competitor to BBCode, just a different and complementary way of writing on the web, which may be more suitable in certain contexts.
In general, the writing difficulty can be ordered like this:
Text < Markdown < BBCode < HTML
The further to the right, the more features, and the further to the left, the simpler.
Basic Markdown Syntax
Let us summarize some basic Markdown syntax below. You can compare them later with this BBCode reference table.
To use bold or italics you do not need to open and close tags but simply insert an asterisk (*) or underline (_) markup.
Example: Writing the word **Markdown** in bold.
Alternative: Writing the word __Markdown__ in bold.
Result: Writing the word Markdown in bold.
Example: Writing the word *Markdown* in italics.
Alternative: Writing the word _Markdown_ in italics.
Result: Writing the word Markdown in italics.
Special tip: To use bold and italic at the same time, just use three markers: *** or ___, or even a combination of these two markers, such as: __* or **_.
Example: Writing the word **_Markdown_** in bold and italics.
Result: Writing the word Markdown in bold and italics.
To make a block quotation, just use the > symbol.
Example: >This sentence is a block quote.
That sentence is a block quote.
Creating ordered lists in Markdown is so intuitive that it doesn’t even seem like an external resource is being used. Just put a dot next to the numbers. You can even indent items by restarting the count.
Example of a sorted list:
Example of a sorted list with sub-items (indentation):
b. Blue Java
To create unordered lists, just use the marker -, + or even *. Examples:
Special tip: If the list starts with a number, to avoid confusion you must insert a backslash.
Example: – 2022\ is a promising year.
Creating blocks of code
To highlight a code block, simply indent the content with four spaces.
You can insert not only an image but also alternative text for an image using Markdown. The syntax is as follows:
Example: ![markdown logo](https://www.bbcode.org/wp-content/uploads/2022/03/markdown-logo.png)
Inserting a Horizontal Line
You can insert a horizontal line with Markdown in three different ways: using 3 asterisks (***), 3 dashes (—) or 3 underscores (___).
You can enter the target URL and anchor text for a link in a single command:
Example: [Home page](https://www.bbcode.org)
Result: Home page
To just turn a URL into a clickable link, just use angle brackets.
This can also be done with an email address:
How to learn more
For more details about Markdown as a text-to-HTML tool, check the original documentation.