<td> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:td

Introduction

The element td denotes a table cell.

The td Element summary

Item Value
Element: td
Permitted Parents: The tr element
Local Attributes: colspan, rowspan, headers
Contents: Flow content
Tag Style:Start and end tags
New in HTML5? No
Changes in HTML5The scope attribute is obsolete. See the scope attribute on the th element instead. The abbr, axis, align, width, char, charoff, valign, bgcolor, height, and nowrap attributes are obsolete, and you must use CSS instead.

Style Convention

td {
   display: table-cell;
   vertical-align: inherit;
}

Using the table, tr, and td Elements to Create a Table

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <table> 
         <tbody>
            <tr> 
               <td>Col 1</td> 
               <td>Col 2</td> 
               <td>Col 3</td> 
            </tr> 
            <tr> 
               <td>Col 1</td> 
               <td>Col 2</td> 
               <td>Col 3</td> 
            </tr> 
         </tbody>
      </table>  
   </body><!--  w  w  w .  j  a  v a 2 s . co m-->
</html>

Related Tutorials