Skip to content

Latest commit

 

History

History
415 lines (279 loc) · 6.87 KB

english.md

File metadata and controls

415 lines (279 loc) · 6.87 KB

Learn Markdown (English)

Learn Markdown so easy in here.

  • Heading

What are Headings? The title or the name of a document or even an chapter of a book is a Heading. Now, let's learn how to use them!

In HTML we use <h1></h1> tag. These are Headings. But not md. We use # instead of <h1></h1> tags. Fitst I will show you HTML way and next, Markdown!

HTML:

<h1>Heading</h1>
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>
<h5>Heading</h5>
<h6>Heading</h6>

Output:

Heading

Heading

Heading

Heading

Heading
Heading

Ok, But how to use these in Markdown?

Markdown:

# Heading
## Heading
### Heading
#### Heading
##### Heading
###### Heading

Output:

Heading

Heading

Heading

Heading

Heading
Heading

As you can see, we use #. If your heading is <h2>, use ##. Hope you got the point!


  • Text style

The meaning of text styles is the same as bolding and italicizing the text.

In HTML we use <b></b> tags. In md we just use ** in start and end of the text. Look at examples.

HTML:

This is <b>Amir</b>. Nice to meet <b>you</b>.

Output:

This is Amir. Nice to meet you.

In MD there is no differences.

Markdown:

This is **Amir**. Nice to meet **you**.

Output:

This is Amir. Nice to meet you.

Ok, Now how to make a text italic? Just use one star *.

HTML:

He said <i>I love to use Git in my projects</i>.

Output:

He said I love to use Git in my projects.

Again, in MD there is no differences.

Markdown:

He said *I love to use Git in my projects*.

Output:

He said I love to use Git in my projects.


  • Links

You may wanted to add a link in your text. You wanna use HTML tag!? Stop doing that!

You can easily do that in MD syntax. Let's take a look to HTML.

HTML:

Open <a href="https://google.com">Google</a>

Output:

Open Google

Markdown:

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

Open Google

Simple, We created links! Fitst part in [], Put the text and in () put the link.


  • Images

I love puting images in Markdown. Simple, Fast and easy syntax. As always, how is HTML way?

HTML:

<img alt="Tree" src="https://wallpapercave.com/wp/wp3385761.jpg">

Output:

Tree

In MD this is more easiler. Just pay attention.

Markdown:

[![Image Alt](image url)](link of picture)

Ok, In first sight, what did you remember? Linking. Right. kind of same. But in Link text we use ![image alt](image url). Image url is the image src and image alt is a text that if pictue couldn't load, text will be appear. And link of picture is a link that will be for picture. I mean when people click on it, will go to that link.

That was how we use images!


  • Lists

We use 2 kind of lists. Ordinary and Unordinary. ol and ul. But this is just for HTML. We can use unordinary list in Markdown.

HTML:

<ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
</ul>

Output:

  • Item 1
  • Item 2
  • Item 3

And in MD we just use -!

Markdown:

- Item 1
- Item 2
- Item 3

How easy was that!? So much :)


  • Ordinary lists

You know, we also can make Ordianary lists too :)

Markdown:

1. Item 1
    1. Item 2
2. Item 2
    1. Item 2
3. Item 3
    1. Item 3

Output:

  1. Item 1
    1. Item 2
  2. Item 2
    1. Item 2
  3. Item 3
    1. Item 3

This is Ordinary lists :)

Was it clear?


  • Nested list

We all know what are Nested Lists, but how to create one of them here?

- Item 1
    - Sub 1
- Item 2
    - Sub 2
- Item 3
    - Sub 3
  • Item 1
    • Sub 1
  • Item 2
    • Sub 2
  • Item 3
    • Sub 3

Or go further!

- Item 1
    - Sub 1
        - Sub Sub 1
- Item 2
    - Sub 2
        - Sub Sub 1
- Item 3
    - Sub 3
        - Sub Sub 1
  • Item 1
    • Sub 1
      • Sub Sub 1
  • Item 2
    • Sub 2
      • Sub Sub 1
  • Item 3
    • Sub 3
      • Sub Sub 1

This is Nested Lists.


  • Highlights

Time to say the part that is really good. The reason that we use Markdown. that is Highlighting codes or inline text.

First lets speak about inline. Well we have nothing like this in HTML. Let's go to markdown code right now.

This is an `inline highlighted` text.

Output:

This is an inline highlighted text.

Ok, now we know about inline highlights. But how to create something like this? :

from platform import system as pltfrm
from os import system as sstm

if pltfrm().lower() == "windows":
    sstm("cls")
elif pltfrm().lower() == "linux":
    sstm("clear")
else:
    sstm("clear")

Simple! Look at the code below:

Image of highlights

What is name? Name is the name of the language that are you writing code in. That block was Python. So I used python front of ```.

Done with Highlights.


  • TODO

You can use TODO in markdown.

  • Go school
  • Buy some LEDs
  • Wash my hands :)
- [x] Go school
- [ ] Buy some LEDs
- [x] Wash my hands :)

Use TODOs. They are funny!


  • Quote

Think you want to add a quote. Like this:

I'm gonna make him an offer he can't refuse.

So, use this structure:

> I'm gonna make him an offer he can't refuse
  • Table

Tables are easy in Markdown.

Fitst of all, first row is always the heading. The head of the table.

| Name | Last Name | Age |

| Name | Last Name | Age |

If you want to make the column in center align,

| Name | Last Name | Age |
| :---: | :---: | :---: |
Name Last Name Age

But how to add a new row?

| Name | Last Name | Age |
| :---: | :---: | :---: |
| Amir | Mohammadi | 17 |
Name Last Name Age
Amir Mohammadi 17

We know how to create a column that is center. How to create one that is left or right?

| Name | Last Name | Age |
| ---: | :---: | :--- |
| Amir | Mohammadi | 17 |
Name Last Name Age
Amir Mohammadi 17

We use :-- for left and --: for right align.

It doesn't matter that the structure be somethign exactly under each other in a specefic size.

For example:

| Name | Last Name | Age |
| :---: | :---: | :---: |
| Amir | Mohammadi | 17 |
| Ali | Hosseini | 20 |
| Omid | Zangeneg | 16 |
| Mohammadi | Fardi | 30 |
Name Last Name Age
Amir Mohammadi 17
Ali Hosseini 20
Omid Zangeneg 16
Mohammadi Fardi 30

And at last, for no align, use ---. Done.