HTML

Create a HTML Table with 500px Width, Border 5, Cellpadding 3 & Spacing 2

Write an HTML Code for Creating a Table with the Width of the Table is 500px and the distance between the boundary of the cell, content is 3 pixels, the border is 5px, Spacing between cells is 2 pixels and the Row Span is 2.

 <table width="500" border="5" cellpadding="3" cellspacing="2">

                <tr>

                    <td rowspan="2">cell 1 </td>

                    <td>cell 2 </td>

                    <td>cell 3</td>

                    <td>cell 4</td>

                    <td>cell 5</td>

                    <td>cell 6</td>

                </tr>

                <tr>

                    <td>cell 7</td>

                    <td>cell 8</td>

                    <td>cell 9</td>

                    <td>cell 10</td>

                    <td>cell 11</td>

                </tr>

             </table>

Output

cell 1 cell 2 cell 3 cell 4 cell 5 cell 6
cell 7 cell 8 cell 9 cell 10 cell 11

 

A table has a width of 500px and a distance of 3 pixels between the cell boundary, content, and border, with a spacing of 2 pixels between cells.

   <table width="500" border="5" cellspacing="2">

                <tr>

                    <td>cell 1</td>

                    <td>cell 2</td>

                    <td>cell 3</td>

                    <td>cell 4</td>

                    <td>cell 5</td>

                    <td>cell 6</td>

               </tr>

               <tr>

                    <td>cell 7</td>

                    <td>cell 8</td>

                    <td>cell 9</td>

                    <td>cell 10</td>

                    <td>cell 11</td>

                    <td>cell 12</td>

              </tr>

              <tr>

                    <td>cell 13</td>

                    <td>cell 14</td>

                    <td>cell 15</td>

                    <td>cell 16</td>

                    <td>cell 17</td>

                    <td>cell 18</td>

              </tr>

            </table>

Output

cell 1 cell 2 cell 3 cell 4 cell 5 cell 6
cell 7 cell 8 cell 9 cell 10 cell 11 cell 12
cell 13 cell 14 cell 15 cell 16 cell 17 cell 18
Back to top button