colgroup and col tags are used to format entire columns : table column : Table Style HTML CSS TUTORIALS


HTML CSS TUTORIALS » Table Style » table column »

 

colgroup and col tags are used to format entire columns


 

<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
      <title> - Tables</title>
   </head>
   <body>
      <table border = "1">
         <caption>Here is a more complex sample table.</caption>
         <colgroup>
            <col align = "right" span = "1" />
         </colgroup>
         <thead>
            <tr valign = "bottom">
               <th># of Humps</th>
               <th>Indigenous region</th>
               <th>Spits?</th>
               <th>Produces Wool?</th>
            </tr>
         </thead>
         <tbody>
            <tr>
               <th>C</th>
               <td>2</td>
               <td>A</td>
               <td rowspan = "2">L</td>
               <td rowspan = "2">L</td>
            </tr>
            <tr>
               <th>L</th>
               <td>1</td>
               <td>A</td>
            </tr>
         </tbody>
      </table>
   </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Table Style
» table column