Markdown is convenient, but the basic syntax is somewhat inadequate: such as the inability to use the folding grammar, the text can not have a different color.
These features can be implemented, but need to be extended using HTML syntax. This article is mainly to tidy up these skills, convenient and better use.
First, the folding syntax:
<details>
Tag 1.1, Code:
<details> <summary>点击时的区域标题:点击查看详细内容</summary> <p> - 测试 测试测试</p> <pre><code> title,value,callBack可以缺省 </code> </pre></details>
summary
: Summary of collapsed grammar presentation
details
: Collapse Grammar Tags
pre
: The text in the original format that displays the element is formatted.
blockcode
: Represents a code block for a program.
code
: Specifies the code example.
1.2, the actual effect:
Area title when clicked: Click to view Details
-Test test test
title,value,callBack可以缺省
Second, other HTML syntax: 2.1 Source:
<span style=‘color:red‘>This is red</span> //字体颜色<ruby> 漢 <rt> ㄏㄢˋ </rt> </ruby> // 特殊字<kbd>Ctrl</kbd>+<kbd>F9</kbd> // 按键标识<span style="font-size:2rem; background:yellow;">**Bigger**</span> //字体大小和背景<font face="微软雅黑" color="red" size="6">字体及字体颜色和大小</font><font color="#0000ff">字体颜色</font><p align="left">居左文本</p><p align="center">居中文本</p><p align="right">居右文本</p>
Use span
or font
label, and style
control the style with attributes.
2.2 Actual effect:
This is red
Hans ㄏㄢˋ
Ctrl+F9
Bigger
Font and font color and size
Font Color
Left text
Center text
Right-of-abode text
Iii. Sources of reference:
- Markdown Embedding Folding Tags | The more https://www.sunyazhou.com/2017/10/25/20171025markdown-skill/the East Gold
- Let your MD document be folded and displayed · Issue #155 · Iuap-design/blog https://github.com/iuap-design/blog/issues/155 (feeling better than the last)
- HTML support in Typora https://support.typora.io/HTML/#html-entities (other HTML syntax and usage)
- Common syntax for markdown (personal summary) | Connorlin ' s Blog http://connorlin.github.io/2016/05/06/Markdown%E7%9A%84%E5%B8%B8%E7%94%A8%E8%AF%AD%E6%B3%95 (%e4 %B8%AA%E4%BA%BA%E6%80%BB%E7%BB%93)/
"MarkDown" uses HTML style and collapsed syntax