DEV Community

Cover image for How to Create Documentation Using Markdown
Mahmudur Rahman
Mahmudur Rahman

Posted on

How to Create Documentation Using Markdown

Introduction

Markdown is a lightweight markup language that makes it easy to format plain text for documentation, blogs, and even web pages. Developers widely use it to write README files, project documentation, and more. In this guide, we'll cover the basics and advanced features of Markdown.


Headings

Use # for headings:

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Enter fullscreen mode Exit fullscreen mode

Bold and Italics

**Bold Text**
*Italic Text*
~~Strikethrough~~

Enter fullscreen mode Exit fullscreen mode

Lists

  • Unordered list:

    - Item 1
    - Item 2
      - Subitem 2.1
    
    
  • Ordered list:

    1. First item
    2. Second item
    
    

Links

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

Enter fullscreen mode Exit fullscreen mode

Images

![Alt text](https://example.com/image.jpg)

Enter fullscreen mode Exit fullscreen mode

Blockquotes

> This is a blockquote.
>
> It can span multiple lines.

Enter fullscreen mode Exit fullscreen mode

Code Blocks

Use triple backticks for multi-line code blocks:

console.log("Hello, World!");

For inline code, use single backticks:

Use `console.log()` to print messages.

Enter fullscreen mode Exit fullscreen mode

Advanced Markdown Features

Tables

| Name  | Age | Country  |
|-------|-----|---------|
| John  | 25  | USA     |
| Alice | 30  | Canada  |

Enter fullscreen mode Exit fullscreen mode

Task Lists

- [x] Task 1
- [ ] Task 2
- [ ] Task 3

Enter fullscreen mode Exit fullscreen mode

Footnotes

Markdown is awesome![^1]

[^1]: Yes, it really is.

Enter fullscreen mode Exit fullscreen mode

Emoji Support

:smile: :rocket: :tada:

Enter fullscreen mode Exit fullscreen mode

Embedding HTML

Markdown also supports inline HTML:

<div style="color:blue">This is blue text</div>

Enter fullscreen mode Exit fullscreen mode

iFrame Embedding

Although Markdown does not directly support iframes, you can use HTML:

<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allowfullscreen></iframe>

Enter fullscreen mode Exit fullscreen mode

URLs

To display a URL as a clickable link:

<https://www.example.com>

Enter fullscreen mode Exit fullscreen mode

Tools for Writing Markdown

Here are some popular tools for writing and previewing Markdown:


Conclusion

Markdown is an essential skill for developers, writers, and content creators. By mastering Markdown, you can create clear, well-structured documentation effortlessly. Start practising today and level up your documentation game!

Happy writing! 🚀

Follow for more!

Top comments (0)