Note: If you don't know what an element/tag is and/or how you must use it we recommend you to read our HTML tags and attributes tutorial that you can find in our HTML tutorials section.
Table of contents
Bypass table of contentsThe HTML th element inserts a header cell in a table (HTML table element).
There can be two types of cells in a table: a header cell and a data cell (HTML td element). Header cells are supposed to provide header information for data cells, but there are cases when data cells can also provide header in formation. This can be achieved by using the "headers" and "scope" attributes in (or pointing to) data cells.
Header cells are usually more prominent than data cells when rendered by user agents. Their content is typically rendered with a bold font style and centered.
Note that the attributes "width", "height", "nowrap" and "bgcolor" have been deprecated in HTML 4.01 because of their presentational nature. Therefore, their use is no longer recommended.
| User | Points | Active |
|---|---|---|
| sammy | 248 | Yes |
| jhon45 | 146 | Yes |
| ackbard | 801 | No |
| jacks34 | 248 | No |
The "id" attribute assigns an identifier to the associated element. This identifier must be unique in the document and can be used to refer to that element in other instances (e.g., from client-side scripts).
The "class" attribute assigns a class name (or a list of class names separated by spaces) to the container element. It's used together with style sheets and tells the browser the class (or classes) to which the element is associated with.
A class gives presentational attributes to elements (read more at the Cascading Style Sheets tutorial).
This attribute is used to define presentational attributes for the containing element, and its value should be composed by style sheets properties. Although, in some cases, it can become useful, a better practice is to place presentational attributes in external files, relating them to elements with the "class" attribute. This way you keep the semantic and presentational parts of your document separated.
You can find more information about presentational attributes at the Cascading Style Sheets tutorial.
The purpose of this attribute is to provide a title for the element. Its value must be a short and accurate description of the element. Browsers usually render it as a "tool tip" when the user puts the mouse pointer over the element for a small period of time.
Specifies the language of an element's content. The default value in "unknown".
When writing XHTML 1.0 documents, the attribute used to specify the language of an elements is "xml:lang". For forward and backward compatibility both attributes can be used simultaneously like in the example below. Note, that in XHTML 1.1 the "lang" attribute has been completely replaced by "xml:lang" and its use is no longer valid.
This attribute indicates the direction in which the texts of the element must be read. This includes content, attribute values and tables. It has two possible values that are case-insensitive:
Specifies the number of columns to be spanned by this cell. The default value is "1".
The value "0" means that this cells will span all cells in the row, from it's position to the last column of the container section (HTML colgroup element).
| Cell1 | Cell2 |
| Cell3 | |
Specifies the number of rows to be spanned by this cell. The default value is "1".
The value "0" means that this cells will span all cells in the column, from it's position to the last row of the container section (HTML thead element, HTML tbody element or HTML tfoot element).
| Cell1 | Cell2 |
| Cell3 |
Contains a space-separated list of ids corresponding to other cells that provide header information for the current one.
Specifies a group of cells for which the current will provide header information. Possible values (case-insensitive) are:
This attribute provides a list of comma-separated category names to which the current cell belongs. These conceptual categories can form groups of cells that show data related under some point of view.
User agents may use the information in this attribute to provide some functionality to display and relate these categories.
Provides a shorter alternative to the cell's content, that may be used by browsers when appropriate. A good use for this attribute could be to replace the cell's content when the rendering space is reduced.
Defines how the text inside the cell is horizontally aligned. It has five possible case-insensitive values:
Defines how the text inside the cell is vertically aligned. Its possible case-insensitive values are:
Indicates a single character that acts as alignment axis for the text inside the cell. The default value is the decimal point character for the current language.
Note that browsers aren't required to support this feature, so the compatibility using this attribute could be reduced.
Specifies the offset to the first occurrence of the alignment character on each line, considering the text direction.
Note that browsers aren't required to support this feature, so the compatibility using this attribute could be reduced.
This attribute has been deprecated in HTML 4.01. Therefore its use is no longer recommended.
Provides a recommended height for the cell. Browsers may change this value depending on space availability.
This attribute has been deprecated in HTML 4.01. Therefore its use is no longer recommended.
Provides a recommended height for the cell.
This attribute has been deprecated in HTML 4.01. Therefore its use is no longer recommended.
When this boolean attribute is present, user agents disable automatic text wrapping for the content of the cell.
Remember that in XHTML, boolean attributes must take their own names as value (e.g., attr_name="attr_name").
This attribute has been deprecated in HTML 4.01. Therefore its use is no longer recommended.
Defines the color that will be used as background of the cell.
See a complete list and information about events in HTML
Diseño y desarrollo: Latitud29.com