HTML

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

Creating HTML Table

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

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

HTML introduction
HTML

HTML – Introduction, History & Syntax

  • December 21, 2019
So, first of all, I would like to ask a question for the first time when you heard this term
html heading tag
HTML

HTML – Heading Tag With Syntax

  • December 21, 2019
A heading tag is one of the most important tags we focus on in HTML or web development because, without