Skip to content

potatoscript/markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 

Repository files navigation

Markdown Tutorial

Table of Contents

  1. Introduction to Markdown
  2. Headings
  3. Paragraphs and Line Breaks
  4. Emphasis (Bold, Italic, Strikethrough)
  5. Blockquotes
  6. Lists (Ordered & Unordered)
  7. Links
  8. Images
  9. Code Blocks & Syntax Highlighting
  10. Tables
  11. Horizontal Rules
  12. Inline HTML
  13. Escaping Characters
  14. Task Lists
  15. Footnotes
  16. Superscript and Subscript
  17. Emoji Support
  18. Math Expressions (LaTeX)
  19. Extended Features (GitHub Flavored Markdown)

Introduction to Markdown

Markdown is a lightweight markup language used to format plain text. It is widely used in:

  • GitHub README files
  • Documentation
  • Blogging platforms
  • Writing notes and emails
  • Content creation for websites

Markdown makes text formatting easy and readable without complex HTML or CSS.


Headings

You can create headings using the # symbol.

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

Rendered Output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraphs and Line Breaks

A new paragraph is created by adding a blank line between blocks of text.

This is the first paragraph.

This is the second paragraph.

Line Breaks

Use two spaces at the end of a line or <br> for a line break.

First line with two spaces at the end.  
Second line.

Rendered as:
First line with two spaces at the end.
Second line.


Emphasis (Bold, Italic, Strikethrough)

Italic

*italic* or _italic_

Rendered as: italic

Bold

**bold** or __bold__

Rendered as: bold

Bold & Italic

***bold and italic***

Rendered as: bold and italic

Strikethrough

~~Strikethrough~~

Rendered as: Strikethrough


Blockquotes

Used for quoting text.

> This is a blockquote.
>> Nested blockquote.

Rendered as:

This is a blockquote.

Nested blockquote.


Lists (Ordered & Unordered)

Unordered List

- Item 1
- Item 2
  - Sub-item 1
  - Sub-item 2

Ordered List

1. First item
2. Second item
   1. Sub-item
   2. Sub-item

Links

Inline Links

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

Rendered as: Google

Reference Links

[Google][google-link]

[google-link]: https://www.google.com

Images

Inline Image

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

Reference Style

![Alt text][image-link]

[image-link]: https://example.com/image.jpg

Code Blocks & Syntax Highlighting

Inline Code

Use `inline code` like this.

Rendered as: Use inline code like this.

Block Code

print("Hello, World!")

Syntax Highlighting

```python
print("Hello, World!")
Rendered as:
```python
print("Hello, World!")

Tables

| Name   | Age | Country |
|--------|-----|---------|
| Alice  | 25  | USA     |
| Bob    | 30  | UK      |

Rendered Output

Name Age Country
Alice 25 USA
Bob 30 UK

Horizontal Rules

---

Rendered as:


Inline HTML

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

Escaping Characters

Use a backslash (\) to escape characters.

\*This is not italicized\*

Rendered as: *This is not italicized*


Task Lists

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

Rendered as:

  • Task 1
  • Task 2
  • Task 3

Footnotes

This is a sentence with a footnote.[^1]

[^1]: This is the footnote text.

Superscript and Subscript

Superscript: E = mc^2
Subscript: H~2~O

Rendered as:
Superscript: E = mcยฒ
Subscript: Hโ‚‚O


Emoji Support

๐Ÿš€ :rocket:

Rendered as: ๐Ÿš€


Math Expressions (LaTeX)

$$ E = mc^2 $$

Rendered as:
$$ E = mc^2 $$


Extended Features (GitHub Flavored Markdown)

  • Task Lists
  • Tables
  • Syntax Highlighting
  • Emojis
  • Footnotes

Blockqutes

> Email-style angle brackets are used for blockquotes.
>> You can nest them too.
>> 
> * You can quote a 
> * list 

> To break the nested blockquote, add a space between lines.

Add another line to resume regular paragraph text.

Email-style angle brackets are used for blockquotes.

You can nest them too.

  • You can quote a
  • list

To break the nested blockquote, add a space between lines.

Add another line to resume regular paragraph text.

home

Code-Syntax

  • Code and Syntax Highlighting
Inline `code` has `back-ticks around` it.

```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```

   var s = "JavaScript syntax highlighting"; 
   alert(s); 

```python
s = "Python syntax highlighting"
print s
```

   s = "Python syntax highlighting" 
   print s 

``` No language indicated, so no syntax highlighting.
But let's throw in a tag.
```

   No language indicated, so no syntax highlighting.  
   But let's throw in a <b>tag</b>. 

home

Emphasis

- Emphasis, aka italics, with *asterisks* or _underscores_.

- Strong emphasis, aka bold, with **asterisks** or __underscores__.

- Combined emphasis with **asterisks and _underscores_**.

- Strikethrough uses two tildes. ~~Scratch this.~~

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and underscores.

Strikethrough uses two tildes. Scratch this.

home

Heading

   # Heading 1
   ## Heading 2
   ### Heading 3

Heading 1

Heading 2

Heading 3

home

Images

  • Inline (titles are optional)
    ![text](/path/img.jpg "Title")
    markdown
  • Reference style
![text][id]

[id]: /url/img.jpg "Title"

home

Line-Breaks

  • insert one newline
  • use <br>

home

Links

  • Inline (titles are optional)
    My Link [linked text](http://github.com/potatoscript/ "Title")
    My Link linked text

  • Reference-style labels (titles are optional)
    My Link [linked-text][myId]
    Define the link anywere in the same block:
    [myId]: http://github.com/potatoscript/ "Title"
    My Link [linked-text][myId]

home

List

Ordered without paragraphs:

  1. Car
  2. Dog
  1. Car
  2. Dog

Unordered with paragraphs:

 * Car \
 myCat kitty
   
 * Dog \
 Snoopy
  • Car
    myCat kitty

  • Dog
    Snoopy

Nested:

   * ABC
     * abc 
   * 123
     1. A
     2. B
     3. C
  • ABC
    • abc
  • 123
  1. A
  2. B
  3. C

home

Phrase-emphasis

*italic* and **bold**
italic and bold

home

SUperscript-and-subscript

  • Superscript
    E=MC<sup>2</sup>
    E=MC2

  • Subscript The CO<sub>2</sub>
    The CO2

home

Table

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1000 |
| col 2 is      | centered      |   $10 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the 
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Tables Are Cool
col 3 is right-aligned $1000
col 2 is centered $10
zebra stripes are neat $1

About

Markdown Cheat Sheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published