4
3

More than 5 years have passed since last update.

【Qiita】初心者がMarkdown記法を使ってみた②

Posted at

前回に引き続きQiitaでMarkdown記法について投稿します。
備忘録として使用したMarkdownを残すことを目的としています。

シンタックスハイライト

バッククオート「`」を3つ繋げて記述します。

  • ノーマル
記述例
``` 
シンタックスハイライト適用中
``` 

---シンタックスハイライトなし---
シンタックスハイライト未設定

---シンタックスハイライトあり---
シンタックスハイライト指定中
  • 言語指定
記述例
```言語:表示したい文字(「記述例」を記載)
シンタックスハイライト適用中
``` 
textを指定中
public class Main {
   public static void main(String[] args) throws Exception {
       System.out.println("Hello world");
   }
}
Javaを指定中
public class Main {
   public static void main(String[] args) throws Exception {
       System.out.println("Hello world");
   }
}
言語指定なし
public class Main {
   public static void main(String[] args) throws Exception {
       System.out.println("Hello world");
   }
}

テーブル

  • 1×1のテーブル
記述例
x|
---
x
  • 2×2のテーブル
記述例
x|x
---|---
a|b
x x
a b
  • 2×2のテーブル
記述例
x|x|x|x|x
---|---|---|---|---
a|b|c|d|e
f|g|h|i|j
k|l|m|n|o
x x x x x
a b c d e
f g h i j
k l m n o
  • 文字位置の指定

文字位置を指定する場合は下線部分を指定することにより指定することが可能となる。
但し、行ごとの指定となり列での指定は不可となる。

■左寄せ   「---」
■センタリング「:-:」
■右寄せ   「--:」

記述例
左寄せ|センタリング|右寄せ
---|:-:|--:
a|b|c
左寄せ センタリング 右寄せ
a b c
  • 改行を入れる

改行を入れるにはHTMLで使用する<br>を改行したい位置に記載することで改行することができる。

記述例
x|x
---
a <br> b|ab
x x
a
b
ab

次回やりたいこと

Markdown記法で知っておいた方が良いと思ったことを実際に記載していました。
基本抑えたと感じているため、次回からは応用しつつ新たなことに挑戦できればと思っています。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3