2008/11/2

標題:H1, H2, H3, H4, H5, H6

可以宣告六種不同方式,展現標題。

屬性說明
通用屬性

此元件可以使用通用屬性,請參考通用屬性的說明。


ALIGN

指定元件內容的水平對齊方式。ALIGN 可設為:
  1. left:文字行向左靠。此為預設值。
  2. right:文字行向右靠。
  3. center:文字行排中央。
  4. 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.
    六號字


©2008-2009 by ant2legs, All Rights Reserved. ant2legs 擁有其製作的文章,圖片與程式的著作權,所有權利保留。