TML 支持有序、無序和定義列表
實例
無序列表
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h4>一個無序列表:</h4>
<ul>
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ul>
</body>
</html>
[/demo]
本例演示無序列表。
有序列表
[demo]
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<ol>
<li>咖啡</li>
<li>牛奶</li>
<li>茶</li>
</ol>
<ol start="50">
<li>咖啡</li>
<li>牛奶</li>
<li>茶</li>
</ol>
</body>
</html>
[/demo]
本例演示有序列表。
無序列表
無序列表是一個項目的列表,此列項目使用粗體圓點(典型的小黑圓圈)進行標記。
無序列表始于 <ul> 標簽。每個列表項始于 <li>。
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
瀏覽器顯示如下:
Coffee
Milk
列表項內部可以使用段落、換行符、圖片、鏈接以及其他列表等等。
有序列表
同樣,有序列表也是一列項目,列表項目使用數字進行標記。
有序列表始于 <ol> 標簽。每個列表項始于 <li> 標簽。
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
瀏覽器顯示如下:
Coffee
Milk
列表項內部可以使用段落、換行符、圖片、鏈接以及其他列表等等。
定義列表
自定義列表不僅僅是一列項目,而是項目及其注釋的組合。
自定義列表以 <dl> 標簽開始。每個自定義列表項以 <dt> 開始。每個自定義列表項的定義以 <dd> 開始。
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
瀏覽器顯示如下:
Coffee
Black hot drink
Milk
White cold drink
定義列表的列表項內部可以使用段落、換行符、圖片、鏈接以及其他列表等等。
更多實例
不同類型的無序列表
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h4>Disc 項目符號列表:</h4>
<ul type="disc">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ul>
<h4>Circle 項目符號列表:</h4>
<ul type="circle">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ul>
<h4>Square 項目符號列表:</h4>
<ul type="square">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ul>
</body>
</html>
[/demo]
本例演示一個無序列表。
不同類型的有序列表
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h4>數字列表:</h4>
<ol>
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ol>
<h4>字母列表:</h4>
<ol type="A">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ol>
<h4>小寫字母列表:</h4>
<ol type="a">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ol>
<h4>羅馬字母列表:</h4>
<ol type="I">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ol>
<h4>小寫羅馬字母列表:</h4>
<ol type="i">
<li>蘋果</li>
<li>香蕉</li>
<li>檸檬</li>
<li>桔子</li>
</ol>
</body>
</html>
[/demo]
本例演示不同類型的有序列表。
嵌套列表
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h4>一個嵌套列表:</h4>
<ul>
<li>咖啡</li>
<li>茶
<ul>
<li>紅茶</li>
<li>綠茶</li>
</ul>
</li>
<li>牛奶</li>
</ul>
</body>
</html>
[/demo]
本例演示如何嵌套列表。
嵌套列表 2
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h4>一個嵌套列表:</h4>
<ul>
<li>咖啡</li>
<li>茶
<ul>
<li>紅茶</li>
<li>綠茶
<ul>
<li>中國茶</li>
<li>非洲茶</li>
</ul>
</li>
</ul>
</li>
<li>牛奶</li>
</ul>
</body>
</html>
[/demo]
本例演示更復雜的嵌套列表。
定義列表
[demo]
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h2>一個定義列表:</h2>
<dl>
<dt>計算機</dt>
<dd>用來計算的儀器 ... ...</dd>
<dt>顯示器</dt>
<dd>以視覺方式顯示信息的裝置 ... ...</dd>
</dl>
</body>
</html>
[/demo]
本例演示一個定義列表。
列表標簽
標簽 描述
<ol> 定義有序列表。
<ul> 定義無序列表。
<li> 定義列表項。
<dl> 定義定義列表。
<dt> 定義定義項目。
<dd> 定義定義的描述。
<dir> 已廢棄。使用 <ul> 代替它。
<menu> 已廢棄。使用 <ul> 代替它。
歡迎使用 Markdown在線編輯器 MdEditor
**Markdown是一種輕量級的「標記語言」**

Markdown是一種可以使用普通文本編輯器編寫的標記語言,通過簡單的標記語法,它可以使普通文本內容具有一定的格式。它允許人們使用易讀易寫的純文本格式編寫文檔,然后轉換成格式豐富的HTML頁面,Markdown文件的后綴名便是“.md”
## MdEditor是一個在線編輯Markdown文檔的編輯器
*MdEditor擴展了Markdown的功能(如表格、腳注、內嵌HTML等等),以使讓Markdown轉換成更多的格式,和更豐富的展示效果,這些功能原初的Markdown尚不具備。*
> Markdown增強版中比較有名的有Markdown Extra、MultiMarkdown、 Maruku等。這些衍生版本要么基于工具,如~~Pandoc~~,Pandao;要么基于網站,如GitHub和Wikipedia,在語法上基本兼容,但在一些語法和渲染效果上有改動。
MdEditor源于Pandao的JavaScript開源項目,開源地址[Editor.md](https://github.com/pandao/editor.md "Editor.md"),并在MIT開源協議的許可范圍內進行了優化,以適應廣大用戶群體的需求。向優秀的markdown開源編輯器原作者Pandao致敬。

## MdEditor的功能列表演示
# 標題H1
## 標題H2
### 標題H3
#### 標題H4
##### 標題H5
###### 標題H5
### 字符效果和橫線等
----
~~刪除線~~ <s>刪除線(開啟識別HTML標簽時)</s>
*斜體字* _斜體字_
**粗體** __粗體__
***粗斜體*** ___粗斜體___
上標:X<sub>2</sub>,下標:O<sup>2</sup>
**縮寫(同HTML的abbr標簽)**
> 即更長的單詞或短語的縮寫形式,前提是開啟識別HTML標簽時,已默認開啟
The <abbr title="Hyper Text Markup Language">HTML</abbr> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.
### 引用 Blockquotes
> 引用文本 Blockquotes
引用的行內混合 Blockquotes
> 引用:如果想要插入空白換行`即<br />標簽`,在插入處先鍵入兩個以上的空格然后回車即可,[普通鏈接](https://www.mdeditor.com/)。
### 錨點與鏈接 Links
[普通鏈接](https://www.mdeditor.com/)
[普通鏈接帶標題](https://www.mdeditor.com/ "普通鏈接帶標題")
直接鏈接:<https://www.mdeditor.com>
[錨點鏈接][anchor-id]
[anchor-id]: https://www.mdeditor.com/
[mailto:test.test@gmail.com](mailto:test.test@gmail.com)
GFM a-tail link @pandao
郵箱地址自動鏈接 test.test@gmail.com www@vip.qq.com
> @pandao
### 多語言代碼高亮 Codes
#### 行內代碼 Inline code
執行命令:`npm install marked`
#### 縮進風格
即縮進四個空格,也做為實現類似 `<pre>` 預格式化文本 ( Preformatted Text ) 的功能。
<?php
echo "Hello world!";
?>
預格式化文本:
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
#### JS代碼
```javascript
function test() {
console.log("Hello world!");
}
```
#### HTML 代碼 HTML codes
```html
<!DOCTYPE html>
<html>
<head>
<mate charest="utf-8" />
<meta name="keywords" content="Editor.md, Markdown, Editor" />
<title>Hello world!</title>
<style type="text/css">
body{font-size:14px;color:#444;font-family: "Microsoft Yahei", Tahoma, "Hiragino Sans GB", Arial;background:#fff;}
ul{list-style: none;}
img{border:none;vertical-align: middle;}
</style>
</head>
<body>
<h1 class="text-xxl">Hello world!</h1>
<p class="text-green">Plain text</p>
</body>
</html>
```
### 圖片 Images
圖片加鏈接 (Image + Link):
[](https://www.mdeditor.com/images/logos/markdown.png "markdown")
> Follow your heart.
----
### 列表 Lists
#### 無序列表(減號)Unordered Lists (-)
- 列表一
- 列表二
- 列表三
#### 無序列表(星號)Unordered Lists (*)
* 列表一
* 列表二
* 列表三
#### 無序列表(加號和嵌套)Unordered Lists (+)
+ 列表一
+ 列表二
+ 列表二-1
+ 列表二-2
+ 列表二-3
+ 列表三
* 列表一
* 列表二
* 列表三
#### 有序列表 Ordered Lists (-)
1. 第一行
2. 第二行
3. 第三行
#### GFM task list
- [x] GFM task list 1
- [x] GFM task list 2
- [ ] GFM task list 3
- [ ] GFM task list 3-1
- [ ] GFM task list 3-2
- [ ] GFM task list 3-3
- [ ] GFM task list 4
- [ ] GFM task list 4-1
- [ ] GFM task list 4-2
----
### 繪制表格 Tables
| 項目 | 價格 | 數量 |
| -------- | -----: | :----: |
| 計算機 | 00 | 5 |
| 手機 | | 12 |
| 管線 | | 234 |
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| Function name | Description |
| ------------- | ------------------------------ |
| `help()` | Display the help window. |
| `destroy()` | **Destroy your computer!** |
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is | some wordy text | 00 |
| col 2 is | centered | |
| zebra stripes | are neat | |
| Item | Value |
| --------- | -----:|
| Computer | 00 |
| Phone | |
| Pipe | |
----
#### 特殊符號 HTML Entities Codes
? & ¨ ? ? £
& < > ¥ ? ± ? § | ˉ ? ·
X2 Y3 ? ? × ÷ ?
18oC " '
[========]
### Emoji表情 :smiley:
> Blockquotes :star:
#### GFM task lists & Emoji & fontAwesome icon emoji & editormd logo emoji :editormd-logo-5x:
- [x] :smiley: @mentions, :smiley: #refs, [links](), **formatting**, and <del>tags</del> supported :editormd-logo:;
- [x] list syntax required (any unordered or ordered list supported) :editormd-logo-3x:;
- [x] [ ] :smiley: this is a complete item :smiley:;
- [ ] []this is an incomplete item [test link](#) :fa-star: @pandao;
- [ ] [ ]this is an incomplete item :fa-star: :fa-gear:;
- [ ] :smiley: this is an incomplete item [test link](#) :fa-star: :fa-gear:;
- [ ] :smiley: this is :fa-star: :fa-gear: an incomplete item [test link](#);
#### 反斜杠 Escape
\*literal asterisks\*
[========]
### 科學公式 TeX(KaTeX)
$$E=mc^2$$
行內的公式$$E=mc^2$$行內的公式,行內的$$E=mc^2$$公式。
$$x > y$$
$$\(\sqrt{3x-1}+(1+x)^2\)$$
$$\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))$$
多行公式:
```math
\displaystyle
\left( \sum\_{k=1}^n a\_k b\_k \right)^2
\leq
\left( \sum\_{k=1}^n a\_k^2 \right)
\left( \sum\_{k=1}^n b\_k^2 \right)
```
```katex
\displaystyle
\frac{1}{
\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{
\frac25 \pi}}=1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {
1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}}
{1+\cdots} }
}
}
```
```latex
f(x)=\int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi
```
### 分頁符 Page break
> Print Test: Ctrl + P
[========]
### 繪制流程圖 Flowchart
```flow
st=>start: 用戶登陸
op=>operation: 登陸操作
cond=>condition: 登陸成功 Yes or No?
e=>end: 進入后臺
st->op->cond
cond(yes)->e
cond(no)->op
```
[========]
### 繪制序列圖 Sequence Diagram
```seq
Andrew->China: Says Hello
Note right of China: China thinks\nabout it
China-->Andrew: How are you?
Andrew->>China: I am good thanks!
```
### 開源項目(vue-admin)
項目地址 https://github.com/artdong/vue-admin
演示動態圖

### 開源項目(ionic3-awesome)
項目地址 https://github.com/artdong/ionic3-awesome
演示動態圖

##聯系方式
* 郵件(hanshangyan@qq.com, 把#換成@)
* QQ: 1029278668
* github: [@artdong](https://github.com/artdong)
* : [@全棧弄潮兒](https://www.toutiao.com/c/user/56196722948/#mid=1559994731399169)
* 簡書: [@全棧弄潮兒](https://www.jianshu.com/u/6c16640d68d2)
* 知乎: [@全棧弄潮兒](https://www.zhihu.com/people/alex-008/activities)
* 博客園: [@全棧弄潮兒](http://www.cnblogs.com/LVBingo)
* 掘金:[@全棧弄潮兒](https://juejin.im/user/5b5059f0e51d4519490924ef)
---
經典前端面試題每日更新,歡迎參與討論,地址:https://github.com/daily-interview/fe-interview。
---
更多angular1/2/4/5、ionic1/2/3、react、vue、微信小程序、nodejs等技術文章、視頻教程和開源項目,請關注微信公眾號——全棧弄潮兒。
### End
lt;font></font>標記和CSS替代語法
文本的大小 文本的顏色 文本的字體
size(1-7,默認值為3) color face
font-size color font-family
<font size=3 color="red" face="楷體">font標簽的屬性用法</font>
<p style="font-size:20px;color:red;font-family:楷體">文本的CSS用法</p>
<b>標記
font-weight:bold;
<i>標記
font-style:italic;
<u>標記
text-decoration:underline;
實例:
<font color="red" size="3"><b><i>歡迎光臨我的網站</i></b></font>
<style type="text/css">
.txt1{color:red;background:white;font-style:italic;font-weight:bold;}
</style>
<font class="txt1">使用CSS</font>
<sup></sup> 文字上標字體標簽(super)
<sub></sub> 文字下標字體標簽(subscipt)
.txt_super{
vertical-align: super;
}
.txt_sub{
vertical-align: sub;
}
<hr/>標記
水平線的高度 對齊方式 寬度 顏色 邊框顏色
size align width color
height text-align width background-color border-color
<hr size=50 align="center" width=100 color="red"/>
<hr style="height:50px;align:center;width:100px";background-color="red"/>
<ul>標記
type屬性值
disc 默認值,實心圓。
circle 空心圓。
square 實心方塊。
list-style-type:
disc(實心圓)、circle(空心圓)、square(方塊)、decimal(阿拉伯數字)、lower-roman(小寫羅馬數字)、
upper-roman(大寫羅馬數字)、lower-alpha(小寫英文字母)、upper-alpha(大寫英文字母)、none(無項目符號)。
默認值:disc(實心圓)
<ol>標記
type屬性值
1 默認值。數字有序列表。(1、2、3、4)
a 按字母順序排列的有序列表,小寫。(a、b、c、d)
A 按字母順序排列的有序列表,大寫。(A、B、C、D)
i 羅馬字母,小寫。(i, ii, iii, iv)
I 羅馬字母,大寫。(I, II, III, IV)
list-style-type:
disc(實心圓)、circle(空心圓)、square(方塊)、decimal(阿拉伯數字)、lower-roman(小寫羅馬數字)、
upper-roman(大寫羅馬數字)、lower-alpha(小寫英文字母)、upper-alpha(大寫英文字母)、none(無項目符號)。
默認值:disc(實心圓)
<table>表格
實例:合并圖片
利用HTML4提供cellpadding和cellspacing屬性,可以達到合并圖片的效果,但是HTML5已經確定不再支持這兩個屬性
<table cellpadding="0" cellspacing="0">
<tr>
<td><img src="ch07_03/1.jpg"/></td>
<td><img src="ch07_03/2.jpg"/></td>
</tr>
<tr>
<td><img src="ch07_03/3.jpg"/></td>
<td><img src="ch07_03/4.jpg"/></td>
</tr>
</table>
使用CSS樣式實現合并圖片
<!DOCTYPE HTML>
<html>
<head>
<title>合并圖片</title>
<style type="text/css">
table{border-collapse: collapse;} /* 邊框會合并為一個單一的邊框 */
td{padding:0;}
img{display: block;}
</style>
</head>
<body>
<table>
<tr>
<td><img src="ch07_03/1.jpg"/></td>
<td><img src="ch07_03/2.jpg"/></td>
</tr>
<tr>
<td><img src="ch07_03/3.jpg"/></td>
<td><img src="ch07_03/4.jpg"/></td>
</tr>
</table>
</body>
</html>
使用CSS語法進行定位
*請認真填寫需求信息,我們會在24小時內與您取得聯系。