When writing in HTML, thetag is used to designate a cell (table data) within a table containing data. The information contained in this element is left-aligned by default. The following sections contain information about thetag, including an example of it in use, and related attributes and browser compatibility.

Example ofcode

MonthSavings
March$200
April$300
May$250

Example result

We have added a few of our own classes to the table using CSS; this action allows us to improve its appearance.

More advanced tables may also include the,,,,, orelements.

  • Example ofcode
  • Example result
  • Attributes
  • Deprecated attributes
  • Compatibility
  • Related information

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for thetag, and a description of each.

Deprecated attributes

A deprecated attribute is one that may function currently but is not supported in going forward. While the attribute may work with the current version of HTML, it will eventually be phased out. It is better to avoid using these attributes to help future-proof your website. Many of these can be substituted using CSS.

Compatibility

Browser, Cell, Class, Column, Compatibility, Computer abbreviations, Container tag, Format, Row,

,, Web design terms

  • How to combine or merge cells in an HTML table.
  • HTML and web design help and support.
,