th border: 1px solid black; : th border « Tags « HTML / CSS






th border: 1px solid black;

   


<!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></title>
<style type="text/css">
table {
 border-collapse: collapse;
 border: 1px solid black;
}

th {
 border: 1px solid black;
 width: 6em;
}
td {
 width:6em;
 border: 1px solid black;
}

th {
 border: 1px solid black;
 width: 6em;
}
td {
 width:6em;
 border: 1px solid black;
 padding: 0;
 margin: 0;
}

input {
 width: 100%;
 border: none;
 margin: 0;
}

.save {
 margin-top: 1em;
 width: 5em;
}

input {
 width: 100%;
 border: none;
 margin: 0;
 text-align: right;  
}
</style>
</head>

<body>
    <form method="get" name="copresentations">
   <table cellspacing="0">
    <caption>
     Summary of Financial Data
    </caption>
    <tr>
     <th scope="col">Fiscal Year </th>
     <th scope="col">Worksite<br />
      Presentations </th>
     <th scope="col">ing Grades </th>
     <th scope="col">Number of Presentators </th>
    </tr>
    <tr>
     <th scope="row">1999</th>
     <td><input type="text" name="1999" /></td>
     <td><input type="text" name="1999" /></td>
     <td><input type="text" name="1999" /></td>
    </tr>
    <tr>
     <th scope="row">2000</th>
     <td><input type="text" name="2000" /></td>
     <td><input type="text" name="2000" /></td>
     <td><input type="text" name="2000" /></td>
    </tr>
    <tr>
     <th scope="row">2001</th>
     <td><input type="text" name="2001" /></td>
     <td><input type="text" name="2001" /></td>
     <td><input type="text" name="2001" /></td>
    </tr>
    <tr>
     <th scope="row">2002</th>
     <td><input type="text" name="2002" /></td>
     <td><input type="text" name="2002" /></td>
     <td><input type="text" name="2002" /></td>
    </tr>
    <tr>
     <th scope="row">2003</th>
     <td><input type="text" name="2003" /></td>
     <td><input type="text" name="2003" /></td>
     <td><input type="text" name="2003" /></td>
    </tr>
    <tr>
     <th scope="row">2004</th>
     <td><input type="text" name="2004" /></td>
     <td><input type="text" name="2004" /></td>
     <td><input type="text" name="2004" /></td>
    </tr>
   </table>
   <input type="submit" class="save" value="Save" />
  </form>
</body>

</html>

   
    
    
  








Related examples in the same category

1.Set table header border to be 1px solid black, its width to 6em
2.Set table border for table header
3.Table header with border
4.th border-left: 1px solid #f4f4f4;
5.th border-bottom: solid 2px #fff;
6.th border-left: 1px solid #EDC9C9;
7.th border-bottom: 1px solid #FFF;
8.th border-left: 1px solid #fff;
9.th border-bottom-width: 1px;
10.th border-bottom-style: solid;
11.th border-bottom-color: #CDC1A7;
12.th, tfoot td border: thin solid black;text-align: center;font-weight: bold;
13.thead th {border-bottom: 1px solid #333; text-align: center; font-weight: bold;}
14.th[scope="col"] {border-bottom: 1px solid gray;}