Pages

Sunday, January 23, 2011

Table Row Element


The table row element is used to create a row within the table element. Tables read the information by rows, row by row. So, there is a table row element that starts a row in the table. The table row element is used for specifying a table row within a table. A table row contains one or more table data and/or table header element which determine individual cells.

Listed below are the most common attributes you can use for the table row element:
  • align - sets the horizontal alignment of the table row's content, such as left, right, center and justify.
  • bgcolor - sets the color value or predefined color name of the table row's background.
  • bordercolor - sets the color value or predefined color name of the table row's border.
  • class - provides the class or classes of the heading. This attribute is used to identify the name of the style class or classes to be used for rendering.
  • height - sets the height in pixels (px) of the table row.
  • id - provides a unique name for the heading.
  • lang - provides the language in which the enclosed content is coded.
  • style - provides a cascading style sheet (CSS) properties to the heading.
  • title - privides a text title for the heading. Most web browser displays the value of the title as "tooltip".

Here's an example on how to use the table row <tr> element:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>the TABLE ROW element</title>
     </head>

     <body>
       <h1>
         the TABLE ROW element
       </h1>
       <table border="1">
          <tr align="center">
              <td>English I</td>
              <td>1.5</td>
          </tr>
          <tr>
               <td>Mathematics I</td>
               <td>1.0</td>
          </tr>
          <tr align="right">
                <td>Physics I</td>
                <td>1.5</td>
          </tr>
     </table>
  </body>
</html>

0 comments:

Post a Comment