Computer Science, asked by rajusurjit2955, 1 year ago

How to give space between table rows in html table structure?

Answers

Answered by nikknitin
0
try CSS. Use margin and padding. Give rows some class and then add some margin to that class in stylesheet
Answered by AdrijaS
0

You can try out the following one:


I think this is the way to do it. I'm not sure if this is what you're trying to explain.

<!DOCTYPE html>

<html>

   <head>

       <style>

           table, th, td {

               border: 1px solid black;

               border-collapse: collapse;

           }

           th, td {

               padding: 5px;

               text-align: left;

           }

       </style>

   </head>

   <body>

       <table>

           <tr>

               <th rowspan="2">Col1</th>

               <th rowspan="2">Col2</th>

               <th colspan="3">Col6</th>

               <th rowspan="2">Col7</th>

           </tr>

           <tr>

               <th>Col 3</th>

               <th>Col 4</th>

               <th>Col 5</th>

           </tr>

           <tr>

               <td colspan="6"></td>

           </tr>

           <tr>

               <td>Row 1</td>

               <td></td>

               <td></td>

               <td></td>

               <td></td>

               <td></td>

           </tr>

           <tr>

               <td colspan="6"></td>

           </tr>

           <tr>

               <td>Row 2</td>

               <td></td>

               <td></td>

               <td></td>

               <td></td>

               <td></td>

           </tr>

       </table>

   </body>

</html>

Similar questions