首页 > 代码库 > 简单了解Markdown
简单了解Markdown
在Github的readme.md文件的编辑中,開始渐渐的接触Markdown。如今简单系统叙述一下Markdown的语法。
Markdown是一种能够使用普通文本编辑器编写的标记语言。通过类似HTML的标记语法。它能够使普通文本内容具有一定的格式。
语法:
1.标题
标题能显示出文章的结构。行首插入1-6个 # ,每添加一个 # 表示更深入层次的内容,相应到标题的深度由 1-6 阶。
H1 :# Header 1
H2 :## Header 2
H3 :### Header 3
H4 :#### Header 4
H5 :##### Header 5
H6 :###### Header 6
2.文本样式
链接 :[Title](URL)
加粗 :**Bold**
斜体字 :*Italics*
删除线 :~~text~~
高亮 :==text==
段落 : 段落之间空一行
换行符 : 一行结束时输入两个空格
列表 :* 加入星号成为一个新的列表项。
引用 :> 引用内容
内嵌代码 : `alert(‘Hello World‘);`
画水平线 (HR) :--------
3.图片
使用Markdown将图像插入文章。你须要在Markdown编辑器输入 ![标题](图片) 。
![Android Training](url)
|
这时在预览面板中会自己主动创建一个图像上传框。你能够从电脑桌面拖放图片(.png, .gif, .jpg)到上传框, 或者点击图片上传框使用标准的图像上传方式。
4.写代码
加入内嵌代码能够使用一对回勾号 `alert(‘Hello World‘)`.对于插入代码, Ghost支持标准的Markdown代码和GitHub Flavored Markdown (GFM) 。标准Markdown基于缩进代码行或者4个空格位:
< header > < h1 >{{title}}</ h1 > </ header > |
GFM 使用三个回勾号```
′′′ < header > < h1 >{{title}}</ h1 > </ header > ′′′ |
5.嵌入链接
This is a paragraph that contains a [link to example](url)
|
6.列表格式
This paragraph contains a list of items. * Item 1 * Item 2 * Item three |
7.使用Markdown 引用文本:
This paragraph has a quote > That is pulled out like this from the text my post. |
8.自己主动链接
<http://ibruce.info>
<bu.ru@qq.com>
|
简单了解Markdown
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。