http://michelf.ca/projects/php-markdown/extra/
markdown="1"
というAttributeを付与することでブロックタグ内でMarkdown書式が有効となる. また該当AttributeはHTML出力時に除去される.
<div markdown="1">
This is *true* markdown text.
</div>
任意のid属性を設定できる.
Header 1 {#header1}
========
## Header 2 ## {#header2}
これを利用すればページ内リンクが設定できる.
[Link back to header 1](#header1)
任意のclass属性も設定できる.
## The Site ## {.main}
id属性と任意数のclass属性を同時に設定.
## The Site ## {.main .shine #the-site}
この設定が有効なのは以下要素となる.
- headers
- fenced code blocks
- links
- images
code blockの別書式. 3個以上連続のチルダ~
で開始と終了を囲む. 終了行は開始行と同じ数のチルダが必要.
~~~~~~~~~~~~~~~~~~~~~
a one-line code block
~~~~~~~~~~~~~~~~~~~~~
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
行頭と行末にもパイプを記述しても同じ結果が得られる.
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
table headerを分けるseparate行でのコロンでalignを設定できる.
| header 1 | header 2 | header 3 |
|:----------------- |:--------:| --------:|
| left(default) | center | right |
テーブルセル内ではspanレベルのMarkdown書式が利用可能.
dl
, dt
, dd
タグのアレ.
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
Orange
: The fruit of an evergreen tree of the genus Citrus.
脚注リンク. 数字は連番で.
That's some text with a footnote.[^1]
[^1]: And that's the footnote.
abbr
タグを生成してくれる. 以下定義リストをMarkdown文書中に定義すると、
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
以下文章内のHTML
とW3C
の部分でabbr
タグが適用される.
The HTML specification
is maintained by the W3C.