說明:✓ 屬性繼承 ✗ 不繼承 [ ] 為適應元素類型,無 [ ] 標出者為所有元素。
✓ Font-family、Font-size(9 10 12 14 16 18 24 36 xx-small x-small small medium large x-large xx-large smaller larger)、Color、Font-style(normal italic oblique)、Line-height(normal)、Font-weight(normal bold bolder lighter 100–900)、Text-transform(capitalize uppercase lowercase none)、Font-variant(normal small-caps)、Font;✗ Text-decoration(none underline overline line-through blink)。
✗ Background-color、Background、Background-image、Background-attachment(fixed scroll)、Background-repeat(no-repeat repeat repeat-x repeat-y)、Background-position [塊、替換]。
✓ Word-spacing(normal [塊])、Letter-spacing(normal)、Text-align(left right center justify [塊]);✗ Vertical-align [內]、Text-indent [塊]、White-space(normal pre nowrap [塊])、Display(inline block list-item 等)。
✗ Border、Border-top-color、Border-top-style(none solid dashed dotted double groove ridge inset outset)、Border-top-width(thin medium thick)及各方向與綜合設定 Border-color、Border-style、Border-width。
✗ Width(auto px pt in cm mm pc em ex % [塊、替])、Height(auto [塊、替])、Float(left right none)、Clear(left right both none)、Margin 及其四向、Padding 及其四向。
✗ List-style-type(disc circle square decimal lower-roman upper-roman lower-alpha upper-alpha none)、List-style-Image、List-style-position(inside outside)[顯示值為 list-item 的元素]。
✗ Position(absolute relative static)、Visibility(visible hidden inherit)、Height、Left、Top、Right、Bottom(皆 auto)、z-index(auto [定位元素])、overflow(visible hidden scroll auto [塊、替])、clip(auto)。
color 設定文字顏色,可用 #rgb、#rrggbb、rgb(255,255,255)、rgb(100%,100%,100%),例如 H1{color:red}、H1{color:#f00}。
background-color 設定背景顏色,格式同上。background-image 設定背景圖片,url(/imageURL)。background-repeat 設定是否重複排列:repeat-x(X 軸)、repeat-y(Y 軸)、no-repeat(不重複)。background-attachment 設定是否捲動,scroll(捲動)或 fixed(不捲動)。background-position 設定起始位置,可用關鍵字(top、bottom、left、right、center)、長度值或百分比。background 為綜合屬性,順序不拘,如 BODY{background:#ffcc00 url(/bg.jpg) fixed center}。
font-family 設定字型,可多個以逗號分隔,含空格字型可用引號。font-style:normal、italic、oblique。font-variant:normal、small-caps。font-weight:normal、bold、lighter、bolder、100–900。font-size 可用絕對(xx-small 至 xx-large)、相對(larger、smaller)或數值單位。font 為綜合屬性,順序為 font-style、font-variant、font-weight、font-size/line-height、font-family。
letter-spacing 設定文字間距。text-decoration:none、underline、overline、line-through。vertical-align:baseline、sub、super、top、middle、bottom。text-transform:none、capitalize、uppercase、lowercase。text-align:left、right、center、justify。text-indent 設定首行縮進。line-height 設定行高。
list-style-type 為有序清單編號(none、decimal、羅馬數字、英文字母)或無序清單符號(none、disc、circle、square)。list-style-image 用自訂符號圖片。list-style-position:outside(凸排)、inside(縮排)。list-style 為綜合設定。
margin 綜合設定邊界,可宣佈 1 至 4 個值,順序為上、右、下、左,缺少者取對邊。padding 設定內容與邊框間留白,規則同 margin。border-width、border-color、border-style 規則類似 margin。border 可分別設定寬度、樣式、顏色,如 DIV{border:5pt solid #ff0000;}。width、height 設定元素寬高。float 設定文字繞排(none、left、right)。clear 設定兩側不繞排(none、left、right)。
z-index 設定堆疊層次(整數或負數,數值大者在上)。visibility:inherit、visible、hidden。