Exercise: Tables


  1. In this exercise you will be creating 3 tables with different styles. For each table open a new Notepad document and type the following HTML codes:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Table</title>
    <head/>
    <body>


    </body>
    </html>


  2. Inside the body tags write the HTML table structure for table 1 then click on the Answer button to check your work. Save the document as table1.html.
  3. Table 1

    The value of the border="2", cellpadding="2" width="250" .

    Column 1 Column 2
    Row 1 Cell 1 Row 1 Cell 2
    Row 2 Cell 1 Row 2 Cell 2






  4. Inside the body tags write the HTML table structure for table 2. The value of the border="4", cellspacing="20" and width ="400". In row 1 merge the data cells for column 1 and 2 . Save the document as table2.html.
  5. Table 2

    Column 1 Column 2
    In row 1 the data cells for column 1 and 2 are merged.
    Row 2 Data cell 1 Row 2 Data Cell 2







  6. Inside the body tags write the HTML table structure for table 3. The value of the border= 12, cellspacing=20 and width=600. Merge the data cells in row 1 and 2 for column one. Save the document as table2.html.
  7. Table 3

    Column 1 Column 2
    The data cells for
    row 1 and 2 are merged.
    Row 1 Data Cell 2
    Row 2 Data Cell 2