MarkDown 연습

Reading time ~3 minutes

markdown 연습


1. Header & Sub-Header


- Header

Syntax

Header
==

Example

Header


- Sub-Header

Syntax

Sub-Header
---

Example

Sub-Header



2. H1 ~ H6 Tags

Syntax

# H1
## H2
### H3
#### H4
##### H5
###### H6

Example

H1

H2

H3

H4

H5
H6



링크를 넣는 방법은 두 가지가 있다.

Syntax

Link: [참조 키워드][링크변수]

[링크변수]: WebAddress "Descriptions"

Example

Link: 참조 키워드


Syntax

[구글로 이동](https://google.com)

Example

구글로 이동



4. BlockQuote

Syntax

> 이것은 BlockQuote<br>
> 이것은 BlockQuote<br>
> 이것은 BlockQuote<br>

Example

이것은 BlockQuote
이것은 BlockQuote
이것은 BlockQuote



5. Ordered List

Syntax

1. Orderd List
2. Orderd List
3. Orderd List

Example

  1. Ordered List
  2. Ordered List
  3. Ordered List



6. Unordered List

*와 +, -는 같은 방법이다.

Syntax

* Unordered List
* Unordered List
* Unordered List

* Unordered List
    * Unordered List
        * Unordered List

+ Unordered List
    + Unordered List
        + Unordered List

- Unordered List
    - Unordered List
        - Unordered List

Example

  • Unordered List
  • Unordered List
  • Unordered List

  • Unordered List
    • Unordered List
      • Unordered List
  • Unordered List
    • Unordered List
      • Unordered List
  • Unordered List
    • Unordered List
      • Unordered List



7. Code Block

- General

Syntax

<pre>코드 블럭 열기 전
<code>이곳에 코드를 삽입</code>
코드 블럭 닫은 후</pre>

Example

코드 블럭 열기 전
이곳에 코드를 삽입
코드 블럭 닫은 후


- Syntax Highlight

python, ruby, c++, c#, Java, Go, Swift, Nodejs 등이 가능하다.

- Python

Syntax

#this program adds up integers in the command line
import sys
try:
    total = sum(int(arg) for arg in sys.argv[1:)
    print 'sum=', total
except ValueError:
    print 'Please supply integer arguments'

Example

#this program adds up integers in the command line
import sys
try:
    total = sum(int(arg) for arg in sys.argv[1:)
    print 'sum=', total
except ValueError:
    print 'Please supply integer arguments'


- C++

Syntax

int str_equals(char *equal1, char *equal2) {
    while(*equal1==*equal2) {
        if(*equal1 == '\0' || *equal2 == '\0') {break;}
        equal1++;
        equal2++;
    }
    if(*equal1 =='\0' && *equal2 == '\0') {return 0;}
    else {return -1;}
}

Example

int str_equals(char *equal1, char *equal2) {
    while(*equal1==*equal2) {
        if(*equal1 == '\0' || *equal2 == '\0') {break;}
        equal1++;
        equal2++;
    }
    if(*equal1 =='\0' && *equal2 == '\0') {return 0;}
    else {return -1;}
}


- C#

Syntax

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Inheritance {
    class Program {
        static void Main(string[] args) {
            Teacher d = new Teacher();
            d.Teach();
            Student s = new Student();
            s.Learn();
            s.Teach();
            Console.ReadKey();
        }
        
        class Teacher {
            public void Teach() {
                Console.WriteLine("Teach");
            }
        }

        class Student : Teacher {
            public void Learn() {
                Console.WriteLine("Learn");
            }
        }
    }
}

Example

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Inheritance {
    class Program {
        static void Main(string[] args) {
            Teacher d = new Teacher();
            d.Teach();
            Student s = new Student();
            s.Learn();
            s.Teach();
            Console.ReadKey();
        }
        
        class Teacher {
            public void Teach() {
                Console.WriteLine("Teach");
            }
        }

        class Student : Teacher {
            public void Learn() {
                Console.WriteLine("Learn");
            }
        }
    }
}


- Java

Syntax

class DoWhileLoopExample {
    public static void main(String args[]) {
        int i=10;
        do {
            System.out.println(i);
            i--;
        }while(i>1);
    }
}

Example

class DoWhileLoopExample {
    public static void main(String args[]) {
        int i=10;
        do {
            System.out.println(i);
            i--;
        }while(i>1);
    }
}


-Go

Syntax

package main

import "fmt"

func main() {
    var greeting = "Hello world!"

    fmt.Printf("normal string: ")
    fmt.Printf("%S", greeting)
    fmt.Printf("\n")
    fmt.Printf("hex bytes: ")

    for i := 0; i < len(greeting); i++ {
        fmt.Printf("%x ", greeting[i])
    }

    fmt.Printf("\n")
    const sampleText = "\xbd\xb2\x3d\xbc\x20\xe2\x8c\x98"

    /* q flag escapes unprintable character, with + flag it escapses non-ascii
    characters as well to make output unambigous */
    fmt.Printf("quoted string: ")
    fmt.Printf("%+q", sampleText)
    fmt.Printf("\n")
}

Exmaple

package main

import "fmt"

func main() {
    var greeting = "Hello world!"

    fmt.Printf("normal string: ")
    fmt.Printf("%S", greeting)
    fmt.Printf("\n")
    fmt.Printf("hex bytes: ")

    for i := 0; i < len(greeting); i++ {
        fmt.Printf("%x ", greeting[i])
    }

    fmt.Printf("\n")
    const sampleText = "\xbd\xb2\x3d\xbc\x20\xe2\x8c\x98"

    /* q flag escapes unprintable character, with + flag it escapses non-ascii
    characters as well to make output unambigous */
    fmt.Printf("quoted string: ")
    fmt.Printf("%+q", sampleText)
    fmt.Printf("\n")
}



8. Strikethrough (취소선)

Syntax

~~취소선~~

Example

취소선



9. Bold, Italic (강조, 기울임)

Syntax

*기울임*

**굵게**

***굵게/기울임***

Example

기울임

굵게

굵게/기울임



10. Image

Syntax

![Alt text](/images/logo.png)
![Alt text](/images/logo.png "Optional title")

Alt text

Alt text

Gitpporter Privacy

Published on January 02, 2023

(PillSoGood) 지원

Published on November 20, 2022