Arteqo Consulting

The European Web Agency

Design, brand and digital development


×

Arteqo Consulting Services

Contact Arteqo

×
I have read and accept the terms and conditions

td tag

The td tag, which, when implemented in the code, is written like this - <td>, is an HTML tag that belongs to table tags. Table HTML tags are used to create tables, as well as to define some non-CSS formatting options.

<td> defines a standard cell in an HTML table. The text in <th> elements are bold and centered by default. The text in <td> elements are regular and left-aligned by default. This tag is supported in the current version of HTML, which is HTML5.

Browser support

Here you can see whether <td> is supported by a certain browser, and, if yes, starting from which version it is supported.

Browser support for <td>
ChromeFirefoxEdgeOperaSafari
Is supportedIs supportedIs supportedIs supportedIs supported

Attributes and values

An attribute is a piece of additional information about a tag. While tags denote the type of objects they mark or create, attributes set the parameters of these objects. These parameters can include anything from the types of possible interactions to its visual style to its actual contents.

Values indicate how a certain attribute is actually implemented, if there is a number of ways it can happen.

What attributes are actually allowed in a certain tag depends on the tag itself. Much like possible attributes depend on a tag, possible values depend on an attribute.

The <td> tag supports the following attributes (with their respective values):

AttributeValueDescription
abbrtextSpecifies an abbreviated version of the content in a cell
(Not Supported in HTML5)
align
  • left
  • right
  • center
  • justify
  • char
Aligns the content in a cell
(Not Supported in HTML5)
axiscategory_nameCategorizes cells
(Not Supported in HTML5)
bgcolor
  • rgb(x,x,x)
  • #xxxxxx
  • colorname
Specifies the background color of a cell
(Not Supported in HTML5)
charcharacterAligns the content in a cell to a character
(Not Supported in HTML5)
charoffnumberSets the number of characters the content will be aligned from the character specified by the char attribute
(Not Supported in HTML5)
colspannumberSpecifies the number of columns a cell should span
headersheader_idSpecifies one or more header cells a cell is related to
height
  • pixels
  • %
Sets the height of a cell
(Not Supported in HTML5)
nowrapnowrapSpecifies that the content inside a cell should not wrap
(Not Supported in HTML5)
numbernumberSets the number of rows a cell should span
  • col
  • colgroup
  • row
  • rowgroup
  • col
  • colgroup
  • row
  • rowgroup
Defines a way to associate header cells and data cells in a table
(Not Supported in HTML5)
  • top
  • middle
  • bottom
  • baseline
  • top
  • middle
  • bottom
  • baseline
Vertical aligns the content in a cell
(Not Supported in HTML5)

Global Attributes

Global attributes are HTML tag attributes that can be used by any tag, hence the name "global". They are in contrast to unique attributes that are tag-specific.

<td> supports global attributes.

Event Attributes

Event attributes are HTML tag attributes that allow triggering actions upon specific conditions, hence the name "event". Other types of attributes, namely global and unique attributes, can also trigger actions, but the difference is that even attributes allow calling scripts, such as JavaScript functions, while most other attributes only support a certain type of action.

<td> supports event attributes.