W3Schools.com

HTML5 <td> Tag

Example

A simple HTML table, with two table cells:

<table border="1">
  <tr>
    <td>Cell A</td>
    <td>Cell B</td>
  </tr>
</table>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <td> tag is supported in all major browsers.


Definition and Usage

The <td> tag defines a standard cell in an HTML table.

An HTML table has two kinds of cells:

  • Header cells - contains header information (created with the <th> element)
  • Standard cells - contains data (created with the <td> element)

The text in <th> elements are bold and centered by default.

The text in <td> elements are regular and left-aligned by default.


Differences Between HTML 4.01 and HTML5

Some HTML 4.01 attributes are not supported in HTML5.


Tips and Notes:

Note: The <td> element is not allowed in the <thead> element.


Attributes

Attribute Value Description
abbr text Not supported in HTML5
align left
right
center
justify
char
Not supported in HTML5
axis category_name Not supported in HTML5
char character Not supported in HTML5
charoff number Not supported in HTML5
colspan number Specifies the number of columns a cell should span
headers header_id Specifies one or more header cells a cell is related to
height pixels
%
Not supported in HTML5
nowrap nowrap Not supported in HTML5
rowspan number Specifies the number of rows a cell should span
scope col
colgroup
row
rowgroup
Not supported in HTML5
valign top
middle
bottom
baseline
Not supported in HTML5
width pixels
%
Not supported in HTML5

Global Attributes

The <td> tag also supports the Global Attributes in HTML5.


Event Attributes

The <td> tag also supports the Event Attributes in HTML5.



W3Schools Certification

W3Schools' Online Certification

The perfect solution for professionals who need to balance work, family, and career building.

More than 10 000 certificates already issued!

Get Your Certificate »

The HTML Certificate documents your knowledge of HTML.

The CSS Certificate documents your knowledge of advanced CSS.

The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.

The jQuery Certificate documents your knowledge of jQuery.

The XML Certificate documents your knowledge of XML, XML DOM and XSLT.

The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE