Markdown 101! A Beginner's Guide to the Most Popular Language for Document Formatting

·

5 min read

What is Markdown? In short, it's an easy-to-learn syntax designed to make creating and editing documents easier, quicker, and more accessible to everyone. Markdown has evolved into one of the most popular languages for formatting text documents in plain text format. It has become widely used by many software developers and web designers who use this language as the foundation of their content creation and editing processes.

Markdown is a lightweight markup language created by John Gruber. It is regarded as one of the most popular languages used to add formatting elements to text documents easily. Markdown doesn't have tags to define the structure, and the syntaxes are special characters with plain texts. In this guide, we'll cover everything you need to know about Markdown so that you can start using it yourself!

Markdown is easy to learn and use, making it a popular choice for document formatting. Markdown doesn't have tags to define the structure, and syntaxes are made up of these special characters with plain texts.

Headers, Paragraphs, and Line Breaks

Markdown is a language used to add formatting elements to text documents. The syntaxes are special characters with plain texts. Headers are created by adding one or more # symbols before a line of text. To create headings, follow this format: ## Title and text can be customized as you like. Paragraphs are created by leaving a blank line between lines of text. Line breaks are created by adding two spaces at the end of a line.

# Heading 1
## Heading 2
### Heading 3

Output:

screenshot-hashnode.com-2022.07.24-01_15_36.png

Bold, Italic, and Strikethrough

Markdown is a simple way to add formatting to your text documents. To make text bold, surround it with asterisks or underscores. For example, **this text would be bold**. You can also make text italic by surrounding it with asterisks or underscores, like this: *this text would be italic*. Finally, you can strikethrough text by surrounding it with tildes. For example, ~~this text would be struck through~~.

Blockquotes

The > symbol is used as a prefix for blockquotes. It is also used to create nested blockquotes. You can also use the > symbol with space as a list prefix.

> Dorothy followed her through many of the beautiful rooms in her castle.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Output:

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Horizontal Rules

Horizontal rules can be used to separate sections of content in a document. In Markdown, a horizontal rule is created by using three asterisks (***),

three dashes (---), or three underscores (___) in a row. These symbols create a line that spans the width of the document.


Link

Adding links in Markdown is pretty simple. You just need to use the following syntax: [Brave Browser](https://brave.com/). My favorite browser is Brave Browser.

Image

You can add images in Markdown by using the exclamation point (!) followed by the square brackets ([]) and then the parentheses ( ). In the square brackets, you will add the alt text for your image, and in the parentheses, you will add the URL of your image's location. The! Syntax defines an image with a title on top and a hyperlink below it.

![The San Juan Mountains are beautiful!](https://mdg.imgix.net/assets/images/shiprock.jpg?auto=format&fit=clip&q=40&w=300)

Output:

The San Juan Mountains are beautiful!

Code/Fenced Block Code

To denote a word or phrase as code, enclose it in backticks (`).

`let site = "Hashnode"`

Output:

let site = "Hashnode"

In fenced block code, use three backticks ("`) or three tildes (~~~) on the lines before and after the code block. This tells the markdown parser to treat everything inside the backticks as code. You can specify the language of the code block after the opening backticks.

screenshot-hashnode.com-2022.07.24-00_28_13.png

Output:

<!DOCTYPE html>
<HTML>
   <head>
    <style>
    </style>
  </head>
  <body>

  </body>
</html>

Ordered List

1. To create an ordered list in Markdown, start each line with a number followed by a period.
2. Make sure there is a space between the number and the period.
4. You can use any number you want, but all items in the list must start with the same number.
7. If you want to add nested items, indent each item in two spaces.
5. To create a sub-list, you indent each item in the list with two spaces like this,
  1. First Item
  2. Second Item

Output:

  1. To create an ordered list in Markdown, start each line with a number followed by a period.
  2. Make sure there is a space between the number and the period.
  3. You can use any number you want, but all items in the list must start with the same number.
  4. If you want to add nested items, indent each item in two spaces.
  5. To create a sub-list, you indent each item in the list with two spaces like this,
    1. First Item
    2. Second Item

Unordered list

- To create an unordered list in Markdown, you use the dash character (-) followed by a space.
- You can also use the asterisk character (*) instead of the dash.
- To create a nested list, you indent each item in the list with two spaces like this,
  - First Item
  - Second Item
- You can also create a nested list using the dash or asterisk characters.

Output:

  • To create an unordered list in Markdown, you use the dash character (-) followed by a space.
  • You can also use the asterisk character (*) instead of the dash.
  • To create a nested list, you indent each item in the list with two spaces like this,
    • First Item
    • Second Item
  • You can also create a nested list using the dash or asterisk characters.