Markdown Cheat sheet

Markdown Cheat sheet

Overview

This cheat sheet provides an overview of some important markdown elements and their syntax.

Markdown Elements and Syntax

  • Headings

Use '#' symbol for headings. We place '#' before the text to convert it into heading. Number of # defines the size of the heading.

We can use different levels of headings as shown below

# Heading1
## Heading2
### Heading3
#### Heading4
##### Heading5
###### Heading6
  • Bold

Use '**' or '__'(two underscores) to make the text look bold. Place the text either within asterisks or underscores as shown below.

**your text**
__your text__
  • Italic

Use '*' or '_' (single underscore) to for italic style. Place the text within single asterisk or underscore as shown below to convert the text to italic style.

*italic text*
_italic text_
  • Bold and Italic

Place the text in 3 asterisks to make the text bold and italic.

***text bold and italic***
  • Strike through

Use '~~' to get the strike through for a text. Place the text/number within tildes as shown below.

~~text~~
~~99~~
  • Normal text

For normal text we can proceed without using any symbols. Any thing we write down is actually shown as normal text

Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
sed eiusmod tempor incididunt ut labore et dolore magna 
aliqua.
  • Horizontal Line

Use '*' or '___'(3 underscores) to get an horizontal line.

***
___

Lists

We have 2 types of list. They are Ordered and Unordered list.

  • Ordered List

Use numbers to give an ordered list. we can give indentation and write sub lists as well as shown below.

1. First Item
2. Second Item
3. Third Item
    1. SubItem1 
    2. SubItem2
  • Unordered List

Use '-' symbol to give an unordered list. Same as ordered lists we can give indentation and write sub lists as well as shown below.

- First Item
- Second Item
    - SubItem1
  • Links

Place the link name in square brackets[] followed by URL in round brackets().

[title](URL)
ex: [click here](https://www.xyz.com)

If we want to display any name on hovering the link, we can mention it after the URL within " " quotes

[title](URL "text to display on hover")
ex: [click here](https://www.xyz.com "my site")
  • Images

Start with '!' symbol followed by alt name for image placed inside the square brackets[] and the image link placed inside round brackets().

![alt name](https://somesite.com/one.png)

We can place images from our repository folder following the same syntax as above expect that the path will be path of the image in repository folders as shown below.

![alt name](./assets/imag1.png)
  • Quoting Code

We can add code in a sentence using backticks.

Code blocks can be added using 3 back quotes (```). Start with the back quotes write your code and end with back quotes again.

We can use different languages(like java, python, JavaScript etc.) as well to get the language specific highlights in the block. Start with back quotes specify the language, write the code and end with back quotes again.

  • Quoting text

Use '>' to quote the text.

>text you want to quote

Others

  • Superscript <sup></sup>
  • Subscript <sub></sub>
  • Emojis :EMOJICODE:
  • Table
    | Syntax | Description |
    | ----------- | ----------- |
    | Header | Title |
    | Paragraph | Text |
    
  • Task lists
  • Footnote etc.

You can always explore others elements if required.

That's all from my side on markdown elements and their syntax. Thanks for reading my blog

Happy Coding journey🙂.