日期:2013-09-15  浏览次数:20963 次

行的控制

段(Paragraph) (可以看作是空行) <p>

你好吗?<p>很好。

你好吗?

很好。

换行 <br>

你好吗?<br>很好。

你好吗?
很好。

不换行<nobr>

<nobr>
请改变您浏览器窗口的宽度, 使之小于这一行的宽度, 看看这个标记的作用!
</nobr>

请改变您浏览器窗口的宽度,使之小于这一行的宽度,看看这个标记的作用!

文字的对齐(Alignment)

<hn align=#>...</hn>
<p align=#>...</p> #=left, center, right

<h3 align=center>Hello<\h3>
<h3 align=right>Hello<\h3>

Hello

Hello

<center>...</center>

<center>Hello</center>

Hello

文字的分区(Division)显示

<div align=left> ... </div>

<div align=left>
Can you feel happiness without unpleasant? <br>
Please show me your smile.
</div>

Can you feel happiness without unpleasant?
Please show me your smile.

<div align=center> ... </div>

Can you feel happiness without unpleasant?
Please show me your smile.

<div align=right> ... </div>

Can you feel happiness without unpleasant?
Please show me your smile.

列表

无序列表 <ul><li>...</ul>

<ul>
<li>Today
<li>Tommorow
</ul>
  • Today
  • Tommorow

有序列表 <ol><li>...</ol>

<ol>
<li>Today
<li>Tommorow
</ol>
  1. Today
  2. Tommorow

定义列表(Definition lists) <dl><dt>...<dd>...</dl>

<dl>
<dt>Today
<dd>Today is yesterday.
<dt>Tomorrow
<dd>Tomorrow is today.
</dl>
Today
Today will be yesterday.
Tomorrow
Tomorrow will be today.

Definition lists Compact <dl compact><dt>...<dd>...</dl>

Today
Today will be yesterday.
Next
Tomorrow will be today.
<dl compact>
<dt>Today
<dd>Today is yesterday.
<dt>Tomorrow
<dd>Tomorrow is today.
</dl>

定制列表元素

定制表中的标记 <li type=#> #=disk, circle, square

<ul>
<li type=disc>ONE
<li type=circle>TWO
<li type=square>THREE
</ul>
  • ONE
  • TWO
  • THREE

定制有序列表表中的序号 <li type=#> #=A, a, I, i, 1

<ol><li type=A>ONE-ONE
<li>ONE-TWO</ol>
  1. ONE-ONE
  2. ONE-TWO
<ol><li type=a>ONE-ONE
<li>ONE-TWO</ol>
  1. ONE-ONE
  2. ONE-TWO
<ol><li type=I>ONE-ONE
<li>ONE-TWO</ol>
  1. ONE-ONE
  2. ONE-TWO
<ol><li type=i>ONE-ONE
<li>ONE-TWO</ol>
<