Skip to main content

Markdown Guide

by:~ cosmicsarthak

  • Offline: Vs Code (Markdown All in One => EXTENSION) (zhang.markdown-all-in-one)

My Markdown Tricks and Tips

Adding Code Blocks

tip

Must Use (```cpp) and (```) in the end of codes. (*For Syntax Highlighting type the name of the language after TOP|```|)

Example: {```cpp #include <iostream> ```} would look like:

#include <bits/stdc++.h>
#include <iostream>


Add a Divinding Horizontal Line by using 3underscores (___) like:


For Using Tables Must Use:

Convert Spreadsheet to Markdown Website by converting that table from Spreadsheet

  • For using links inside this repository, must use Copy Path of that File/Repo : Example: for accessing README.md file of that Repo, we use code: [Readme file inside this repository](https://github.com/cosmicsarthak/cosmicsarthak-CP-Interview-guide/blob/main/README.md) Result: Readme file inside that repository

  • For using link to a named anchor/Heading/Contents, must use - [Best Normal ⇒ Markdown:](#best-normal--markdown):
    Result:

  • For adding an Image , must use ![Contents Link Screenshot](Images/CP-Interview-IMAGES/Contents%20Link%20Screenshot.png) and also MUST add <br/> after before the paragraph above image.Result: Above Screenshot ⬆⏫


Adding Quotes:

  • > To be or not to be, that is the question.


    **Result**: > To be or not to be, that is the question.

    Prefixing the line with a > converts it into a block-quote.



Paragarph into code:

  • Indenting by 4 spaces will turn an entire paragraph into a code-block. Example:
    - First Point
    - 2nd Point
    - 3rd Point
    - 4th Point
    will become:
  • First Point
    • 2nd Point
      • 3rd Point
        • 4th Point

Adding Points:

  • Can add - or * infront of sentence/line


Adding supersrcipt -> O(n2) & Subscript -> O(n2)

tip
O(n<sup>2</sup>)

O(n2)

&&

O(n<sub>2</sub>)

O(n2)


Trying to add Button:

<button class="button-save large">Big Fat Button</button>

Typing a character as it is(called as Escaping in markdown):

  • What if you literally want to type literally - without it appearing in italics? Escaping Markdown characters with a back-slash \ allows you to use any characters which might be getting accidentally converted into HTML.
    \*literally\*

Adding line-break

  • Use <br/> for line-break

Adding Underline <u> </u>

note
## <u>A Level-2 Header with Underline</u>
- <u>Hello</u>

will become 👇

A Level-2 Header with Underline

  • Hello

Adding Dropdown 🔽

<details close>
<summary>Heading</summary>
<br>

// Code

</details>
Heading

// Code


Embedding HTML

<button class="button-save large">Big Fat Button</button>

- Possibly the coolest feature of Markdown is that it also just supports plain old HTML. If you find yourself stuck and unable to do what you want in Markdown - you can simply write in regular HTML and it will work just fine.

Big Fat Button

So you can drop in any HTML, sharing button, JavaScript snippet or iFrame you like and it will work on the page just as normal.

---

### Strike-throughs

- `\~\~deleted words\~\~ <br/>
\~\~deleted words\~\~

---

### Highlights

- `==oooh fancy==`

---

### Adding CheckBox

- [ ] **CheckBox** **(_Must USe `- [ ]` For Inserting a Checkox_)** <br/>

---

### Markdown Footnotes

```md
The quick brown fox[^1] jumped over the lazy dog[^2].

[^1]: Foxes are red
[^2]: Dogs are usually not red
```

<!-- ![Screenshot](Images/CP-Interview-IMAGES/Screenshot_5.png) -->

---

---

### Helpful resources:

> Some Markdown CheatSheets:
>
> - https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet
> - ...
```



Add Code Blocks inside another code Blocks

Use ````jsx with ````

  • It means use 4 times ~ `

Strike Throug

<s>This is wrong</s>
This is wrong