Skip to content

I have created this as a quick reference so that I can have a glimpse whenever I need it. (markdown syntax cheat sheet)

Notifications You must be signed in to change notification settings

alihassan-io/markdown-syntax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 

Repository files navigation

Markdown Syntax

Markdown is a lightweight markup language with plain text formatting syntax that can be converted to HTML, PDF, and other formats. It is commonly used to create documentation, README files, and online content. Here are some basic syntax examples:

Table of Contents

  • Headings
  • Text
  • Line
  • Comments
  • Blockquote
  • Boxed
  • Subscript & Superscript
  • Footnote
  • Alignments
  • Buttons
  • Math Expressions
  • Links
  • Lists(ordered + unordered)
  • Foldable Text
  • Code Block (Inline + Block)
  • Images
  • Table
  • Task List
  • Scroll To Top
  • Hotkey List
  • Emoji

Heading 1

Markup :  # Heading 1 #

-OR-

Markup :  ============= (below H1 text)

Heading 2

Markup :  ## Heading 2 ##

-OR-

Markup: --------------- (below H2 text)

Heading 3

Markup :  ### Heading 3 ###

Heading 4

Markup :  #### Heading 4 ####
Heading 5
Markup :  ##### Heading 5 #####
Heading 6
Markup :  ###### Heading 6 ######

Common text

Markup :  This is A Common text

Italic

Markup : _Italic_

Strikethrough

Markup : ~~Strikethrough~~

Bold

Markup : **Bold** or __Bold__

Bold & Italic

Markup : ***Bold & Italic*** or ___Bold & Ilatic___

Monospaced

This is a monospaced text inside a samp tag.

Markup: <samp>This is a monospaced text inside a samp tag.</samp>

Underlined

This is a underlined text inside a ins tag.

Markup: <ins>This is a underlined text inside a ins tag.</ins>

This is ==important word== that's why highlighted.

Markup  :   This is ==important word== that's why
            highlighted.

Horizontal line :




Markup :    -------- (hyphens)
            OR
            ******** (asterisks)
            OR
            ________ (underscores)

Comments

Markup  :   <!-- It's a comment. -->

Blockquote

Markup :  > Blockquote

Nested blockquote

Markup :  >> Nested Blockquote

Boxed

The quick brown fox jumps over the lazy dog.

Subscript & Superscript

3 73-1 & -2 30-1

Markup:     3 <sup>73-1</sup> & -2 <sup>30-1</sup>

A sentence with footnote. 1

Alignments

Markup:   <p align="left">
          <img src="https://www.bettersrv.com/images/logo.png" />
          </p>

Markup:   <p align="center">
          <img src="https://www.bettersrv.com/images/logo.png"/>
          </p>

Markup:   <p align="right">
          <img src="https://www.bettersrv.com/images/logo.png"/>
          </p>

Button

cmd + shift + p

Markup  :   <kbd>cmd + shift + p</kbd>

Button With Space


 cmd + shift + p 

Markup  :   <kbd> <br> cmd + shift + p <br> </kbd>

Button with Link

BetterSrv

Markup  :   <kbd>[BetterSrv](https://bettersrv.com/)</kbd>

Math Expressions

Inline math expression $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

Markup  :   Inline math expression $x = {-b \pm \sqrt
            {b^2-4ac} \over 2a}$

Math Expression as a Block

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

Markup  :   $$
            x = {-b \pm \sqrt{b^2-4ac} \over 2a}
            $$

Simple Link

Markup : [Simple Link](https://github.com/alihassan-io)

Link With Title

Markup : [Link With Title](https://github.com/alihassan-io "Ali Hassan")
  • Unordered List
    • Nested Unordered List
    Markup :    - Unordered List
                    - Nested Unordered List
                        - Sub-Nested Unordered List
                - Unordered List
  1. Ordered List 1
    1. Nested Ordered List 1a
    2. Nested Ordered List 1b
  2. Ordered List 2
    Markup :    1. Ordered List 1
                    1. Nested Ordered List 1a
                    2. Nested Ordered List 1b
                2. Ordered List 2

Title With Dropdown Paragraph:

Summary

This is a paragraph.

Markup : <details>
           <summary>Summary</summary>
           <p>This is a paragraph.</p>
         </details>

<p>HTML paragraph</p>

Markup : `<p>This is HTML paragraph.</p>`

Image With Alt Text

AliHassan.io

Markup : ![AliHassan.io](https://www.bettersrv.com/images/logo.png "AliHassan.io (Optional)")

Code Block:

npm install

npm start
Markup:     ```bash
            npm install
            npm start
            ```

C++ Code Block

cout<<"Hello Web!";
Markup :    ```c++
            cout<<"Hello Web!";
            ```

HTML Code Block

<h3>HTML</h3>
<p>This is a paragraph tag</p>
Markup  :   ```html
            <h3>HTML</h3>
            <p> This is a paragraph tag </p>

JavaScript Code Block

console.log("Hello Web!");
Markup :    ```javascript
            console.log("Hello Web!");
            ```
Name Email
Ali Hassan alihassan@gmail.com
Markup:     | Name | Email        |
            | ---- | ------------ |
            | Ali Hassan | alihassan@gmail.com |

CheckList

  • Task (uncompleted)
  • Task (completed)
    Markup  :   - [ ] Task (uncompleted)
                - [x] Task (completed)
  • Task (uncompleted)
    • Subtask (uncompleted)
    Markup  :   - [ ] Task (uncompleted)
                - [ ] Subtask (uncompleted)
pie
"Movies" : 80
"TV shows" : 20
Loading
Markup  :   ```mermaid
            pie
            "Movies" : 80
            "TV shows" : 20
            ```

Link to a specific part of the page:

Scroll To Top

Markup  :   [link text](#section_name)
            section_title<a name="section_name"></a>

Hotkey:

⌘F

⇧⌘F

Markup : <kbd>⌘F</kbd>

Hotkey list:

Key Symbol
Option
Control
Command
Shift
Caps Lock
Tab
Esc
Power
Return
Delete
Up
Down
Left
Right

Emoji:

❗ Emoji icons can enhance text. 👍

Markup : Code appears between colons :EMOJICODE:

Contributing

If you'd like to contribute to this repository, please follow these steps:

  1. Fork the repository
  2. Create a new branch for your changes
  3. Make your changes and commit them to your branch
  4. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Footnotes

  1. It's a footnote.

    Markup: 1: It's a footnote. 2

  2. It's a multiline footnote.

    Markup : 2: It's a multiline footnote.

About

I have created this as a quick reference so that I can have a glimpse whenever I need it. (markdown syntax cheat sheet)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published