ALIGN
指定元件內容的水平對齊方式。ALIGN 可設為:
- left:文字行向左靠。此為預設值。
- right:文字行向右靠。
- center:文字行排中央。
- justify:文字行兩邊都對齊。
- 範例:
<style type='text/css'> .hd1 {width:250px; background:#888800} </style> <h1 class=hd1>一號字</h1> <h2 class=hd1 align=center>二號字 中央</h2> <h3 class=hd1 align=right>三號字 靠右</h3> <h4 class=hd1>四號字</h4> <h5 class=hd1 align=justify>五號字 Not ask what your country can do for you, ask what you can do for your country.</h5> <h6 class=hd1>六號字</h6>
- 執行結果:
一號字
二號字 中央
三號字 靠右
四號字
五號字 Not ask what your country can do for you, ask what you can do for your country.
六號字
|