table border css code example

Example 1: table border css

table, th, td {
  border: 1px solid black;
}

Example 2: html create a table

<html>
 <head>
   <title>Working with HTML Tables</title>
 </head>
 <body>
   <table>				<!-- create an table object -->
     <tr>				<!-- "tr" represents a row -->
       <th>Name</th>	<!-- use "th" to indicate header row -->
       <th>Date of Birth</th>
       <th>Weight</th>
     </tr> 
     <tr>				<!-- once again use tr for another row -->
       <td>Mary</td>	<!-- use "td" henceforth for normal rows -->
       <td>12/13/1994</td>
       <td>130</td>
     </tr>    
   </table>
 </body>
</html>

Tags:

Html Example