How to make MD (markdown) document

What is MD (markdown) document

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. It is a very simple language, with a syntax that is easy to learn. 

Markdown documents can be created with any text editor, and they can be rendered into HTML, PDF, or other formats.

Markdown is often used to create blog posts, README files, and documentation. It is also a popular choice for taking notes and creating outlines.

Why use Markdown?

Markdown is a lightweight markup language that is often used for documentation. It has a number of advantages over other markup languages, making it a good choice for documentation:

  • Easy to learn and use: The syntax of Markdown is very simple and easy to learn, even for people who are not familiar with markup languages. This makes it a good choice for documentation writers who want to focus on the content of their documentation, rather than the formatting.
  • Portable and compatible: Markdown files can be easily converted to HTML, PDF, or other formats, making them portable and compatible with a wide range of platforms and devices. This means that documentation written in Markdown can be easily shared and viewed by anyone, regardless of their software or hardware setup.
  • Flexible and customizable: Markdown is a very flexible language, and there are many different extensions and plugins that can be used to add additional features and functionality. This makes it possible to tailor Markdown to the specific needs of your documentation project.
  • Readable and maintainable: Markdown files are easy to read and understand, even without being rendered as HTML. This makes them easy to maintain and update, as you can easily see the changes that you have made.
  • Version control-friendly document format: Markdown files are in plain text-based format thus it is very easy to maintain and collaborate using version control systems such as Git (GitHub/GitLab)

In addition to these advantages, Markdown is also free and open source, making it a cost-effective choice for documentation projects.

Sample Markdown Syntax

Here are some of the basic Markdown syntax:

To create a heading, use number signs (#) followed by the heading text. For example, to create a level 1 heading, you would use:

# This is a level 1 heading

To create a bulleted list, use asterisks (*) or hyphens (-) followed by the list item text. For example, to create a bulleted list, you would use:

* This is a list item
* This is another list item

To create a numbered list, use numbers followed by a period (.) followed by the list item text. For example, to create a numbered list, you would use:

1. This is a numbered list item
2. This is another numbered list item

To create a link, use square brackets ([]) followed by the link text, then parentheses (()) followed by the link URL. 

For example, to create a link to Google, you would use:

[Google](https://www.google.com/)

These are just a few of the basic Markdown syntax. 

There are many more features that Markdown supports, and you can find more information on the Markdown Guide: https://www.markdownguide.org.

Markdown documents are a great way to create formatted text documents without having to use a WYSIWYG editor. They are easy to learn and use, and they can be rendered into a variety of formats. If you need to create a formatted text document, Markdown is a great option.

Use the below as your Markdown Cheat Sheet as a quick overview of all the Markdown syntax elements.

Markdown Basic Syntax

ElementMarkdown SyntaxNotes
Heading# H1
## H2
### H3
Use #. Increments the number of # for additional heading levels.
Bold**bold text**Put the word or phrase between two asterisks (both before and after the word or phrase).
Italic*italicized text*Put the word or phrase between an asterisk (both before and after the word or phrase).
Blockquote> blockquoteAdd > then space followed by the paragraph to blockquote it.
Ordered List1. First item
2. Second item
3. Third item
Use the number + period in the order or you can use all “1.” the MD will order it for you.
Unordered List– First item
– Second item
– Third item
Use – then space followed by the item name.
Code`code`Add ` before and after the code.
Horizontal RuleAdd — will create a horizontal line in your document.
Link[title](https://www.tech-cookbook.com)Use the [] and enter the title/text to have the link and followed by the URL inside the ().
Image![alt text](image.jpg)Start with ! and add the alt text inside [] then followed by path to the image inside the ().
Markdown Basic Syntax table

Markdown Extended Syntax

ElementMarkdown SyntaxNotes
Table| table heading col 1 | table heading col 2 |
| — | — |
| data 1 col 1 | data 1 col 2|
| data 2 col 1 | data 2 col 2|
Use the combination of | and -.
Each row should start with | and end with |.
Fenced Code Block“`
{
“your code”
“foo 1”
}
“`
Wrap your code with three ` (before and after the code)
FootnoteSample sentence with a footnote. [^1]

[^1]: This is the footnote sample
Use [^1] to indicate there is a footnote.
Use [^1]: and followed by the footnote information.
Heading ID# Heading 1 with ID {#custom-id}use {#} after the heading to apply custom ID to the heading.
Definition Listterm
: definition
Use : next line after the term and followed by the definition of the term.
Strikethrough~~ this is invalid sentence.~~Use ~~ before and after the word or phrase to strikethrough that word or phrase.
Task List– [x] checklist item 1
– [] checklist item 2
– [] checklist item 3
Use – [] to create a check list type of list.
add x in the [] to indicate that list item is checked.
EmojiMy smiley face :smiley:Use certain word with : before and after.
HighlightThis is the ==highlighted text==Use == before and after the word or phrase to highlight that word or phrase.
SubscriptCO~2~Use ~ before and after the subscript number.
SuperscriptX^2^Use ^ before and after the superscript number.
Markdown Extended Syntax table

Saving Markdown file

Markdown file must be save as .md file extension to make it recognize as MD (markdown) file.

Latest Posts

Feel free to share this post!

1 thought on “How to make MD (markdown) document”

  1. Pingback: How to convert MD (markdown) file to PDF using Pandoc on macOS Ventura 13 - Tech CookBook

Comments are closed.

Scroll to Top