亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
characters

HTML<th>元素定義表格內(nèi)的表頭單元格。這個組的確切性質(zhì)是由scope=和headers屬性定義的。

內(nèi)容類別

沒有。

允許的內(nèi)容

Flow content, but with no header, footer, sectioning content, or heading content descendants.

標記遺漏

開始標記是強制性的。如果緊跟著一個<th>或<td>元素,或者在其父元素中沒有更多的數(shù)據(jù),則可以省略結(jié)束標記。

允許父級

一個<tr>元素。

允許ARIA角色

任何

DOM接口

HTMLTableHeaderCellElement

屬性

這個元素包含全局屬性。

abbr  在HTML5中

此屬性包含單元格內(nèi)容的簡短說明。用戶代理(例如,語音閱讀器)可以出現(xiàn)在描述之前。

用法注意:不要使用這個屬性,因為它在最新的標準中已經(jīng)過時了?;蛘?,您可以將縮寫說明放在單元格中,并將長內(nèi)容放置在title屬性中。

align  在HTML 4中,在HTML5中此枚舉屬性指定如何處理單元格內(nèi)容的水平對齊??赡艿闹凳牵?/p>

  • left: 單元格內(nèi)容左對齊

  • center: 單元格內(nèi)容居中

  • right:  單元格內(nèi)容右對齊

  • justify (僅文字內(nèi)容): 內(nèi)容拉伸以覆蓋單元格

  • char (僅文字內(nèi)容): 內(nèi)容相對<th>標簽中的某個字符對齊(默認值是頁面語言的小數(shù)點字符)。該字符由charcharoff 屬性定義。

該屬性未指定時的默認值是left。

用法注意:不要使用此屬性,因為它在最新標準中已經(jīng)過時。

  • 為了實現(xiàn)作為同樣的效果leftcenter,rightjustify值的CSS應(yīng)用text-align屬性的屬性。

  • 要達到與該char值相同的效果,請給該text-align屬性使用相同的值char。在CSS3中未實現(xiàn)。

axis  在HTML5中該屬性包含空格分隔字符串的列表。每個字符串都是id這個頭文件適用的一組單元格。

用法注意:不要使用此屬性,因為它在最新的標準中已經(jīng)過時:請使用該scope屬性。

bgcolor此屬性定義列中每個單元格的背景顏色。它由sRGB中定義的6位十六進制代碼組成,前綴為“?!?。該屬性可以與十六個預(yù)定義的顏色字符串中的一個一起使用:


black = "#000000"


green = "#008000"


silver = "#C0C0C0"


lime = "#00FF00"


gray = "#808080"


olive = "#808000"


white = "#FFFFFF"


yellow = "#FFFF00"


maroon = "#800000"


navy = "#000080"


red = "#FF0000"


blue = "#0000FF"


purple = "#800080"


teal = "#008080"


fuchsia = "#FF00FF"


aqua = "#00FFFF"

使用說明:不要使用這個屬性,因為它是非標準的,只能在Microsoft Internet Explorer的某些版本中實現(xiàn):<th>元素應(yīng)該使用CSS進行樣式化。要創(chuàng)建類似的效果,請使用CSS中的background-color屬性。

char  在HTML 4中,在HTML5中列的內(nèi)容與<th>元素中的字符對齊。典型值包括一個句點(。)以對齊數(shù)字或貨幣值。如果align未設(shè)置char,則忽略此屬性。

用法注意:不要使用此屬性,因為最新標準不再支持該屬性。為了達到同樣的效果,可以將字符指定為屬性的第一個值text-align,在CSS3中未實現(xiàn)。

charoff  在HTML 4中,在HTML5中該屬性用于將列數(shù)據(jù)移動到由char屬性指定的字符的右側(cè)。它的值指定了這個轉(zhuǎn)換的長度。

用法注意:不要使用此屬性,因為最新標準不再支持該屬性。

colspan該屬性包含一個正整數(shù)值,表示一個單元格被擴展了多少列。它的默認值是1.如果它的值被設(shè)置為0,單元格被擴展到最后一個元素<colgroup>。大于1000的值被剪裁到1000.

headers該屬性包含一個由空格分隔的字符串的列表,每個字符串對應(yīng)于與該元素相關(guān)id的其他<th>元素的屬性。

rowspan該屬性包含一個正整數(shù)值,用于指示單元格擴展的行數(shù)。其缺省值是1.如果它的值被設(shè)定為0,該單元被延伸到該表段的最后一個元素(<thead>,<tbody><tfoot>)。高于65534的值被剪裁到65534。

scope這個枚舉屬性定義了頭<th>元素(在元素中定義的)所涉及的單元格。它可能有以下值:

  • row:標題涉及它所屬的行的所有單元格。

  • col:標題涉及它所屬的列的所有單元格。

  • rowgroup:標題屬于一個行組,并涉及到它的所有單元格。這些單元格可以放置在標題的右側(cè)或左側(cè),具體取決于元素中dir屬性的值<table>。

  • colgroup:標題屬于一個colgroup并且涉及到它的所有單元格。

  • auto

valign  在HTML 4中,在HTML5中此屬性指定文本在單元格內(nèi)如何垂直對齊。這個屬性的可能值是:

  • baseline:將文本放置在單元格底部附近,并將其與字符的基線而不是底部對齊。如果字符不下降到基線以下,則基線值達到與“基準”相同的效果bottom。

  • bottom:將文本放置在單元格底部附近。

  • middle:將文本居中在單元格中。

  • top:將文本放置在單元格頂部附近。

用法注意:不要使用此屬性,因為最新標準不再支持該屬性:請改用CSS vertical-align屬性。

width  在HTML 4.01中該屬性用于定義推薦的單元格寬度。額外的空間可以添加cellspacing和cellpadding屬性,<col>元素的寬度也可以創(chuàng)建額外的寬度。但是,如果列的寬度太窄,無法正確顯示特定的單元格,則會在顯示時展寬。

用法注意:不要在最新的標準中使用這個屬性:width改為使用CSS 屬性。

例子

See <table> for examples on <th>.

規(guī)范

Specification

Status

Comment

HTML Living StandardThe definition of 'th element' in that specification.

Living Standard


HTML5The definition of 'th element' in that specification.

Recommendation


瀏覽器兼容性

Feature

Chrome

Edge

Firefox

Internet Explorer

Opera

Safari

Basic Support

1

(Yes)

1

(Yes)

(Yes)

(Yes)

abbr

1

(Yes)

1

(Yes)

(Yes)

(Yes)

align

?

(Yes)

No1

(Yes)

?

?

axis

1

(Yes)

1

(Yes)

(Yes)

(Yes)

bgcolor

?

No

No

(Yes)

?

?

char

?

(Yes)

No2

(Yes)

?

?

charoff

?

(Yes)

No2

(Yes)

?

?

colspan

1

(Yes)

1

(Yes)

(Yes)

(Yes)

headers

1

(Yes)

1

(Yes)

(Yes)

(Yes)

rowspan

1

(Yes)

1

(Yes)

(Yes)

(Yes)

scope

1

(Yes)

1

(Yes)

(Yes)

(Yes)

valign

?

(Yes)

No1

(Yes)

?

?

width

1

(Yes)

1

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

abbr

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

align

?

?

(Yes)

No1

(Yes)

?

?

axis

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

bgcolor

?

?

No

No

(Yes)

?

?

char

?

?

(Yes)

No2

(Yes)

?

?

charoff

?

?

(Yes)

No2

(Yes)

?

?

colspan

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

headers

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

rowspan

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

scope

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

valign

?

?

(Yes)

No1

(Yes)

?

?

width

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

Previous article: Next article: