HTML <td> Attribute

Attribute Value Description abbr text Not supported in HTML5. Specifies an abbreviated version of the content in a cell align left right center justify char Not supported in HTML5. Aligns the content in a cell axis category_name Not supported in HTML5. Categorizes cells bgcolor rgb(x,x,x) #xxxxxx colorname Not supported in HTML5. Specifies the background color […]

HTML <th> scope Attribute

Example Specify that the two header cells are headers for columns: <table> <tr> <th></th> <th scope=”col”>Month</th> <th scope=”col”>Savings</th> </tr> <tr> <td>1</td> <td>January</td> <td>$100</td> </tr> <tr> <td>2</td> <td>February</td> <td>$80</td> </tr> </table> Try it Yourself » Definition and Usage The scope attribute specifies whether a header cell is a header for a column, row, or group of columns or […]

HTML <th> rowspan Attribute

Example An HTML table with a header cell that spans three rows: <table> <tr> <th>Month</th> <th>Savings</th> <th rowspan=”3″>Savings for holiday!</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The rowspan attribute defines the number of rows a header cell should span. […]

HTML <td> Tag

Example A simple HTML table, with two table cells: <table> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> Try it Yourself » More “Try it Yourself” examples below. 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 […]

HTML <th> Tag

Example A simple HTML table with two header cells and two data cells: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <th> tag defines a header cell in an HTML table. An HTML table has two kinds of cells: […]

HTML <tr> Tag

Example A simple HTML table, containing two columns and two rows: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <tr> tag defines a row in an HTML table. A <tr> element contains one or more <th> or <td> elements. Browser Support Element <tr> […]