Html table assignment

In very few places the data can be kept very beautiful. So that later the data can be found very easily without any hassle. These consist of rows and columns and are often used on websites to effectively display tabular data.

HTML table-based layout. The table provides the easiest way to create layouts in HTML. Typically, this involves the process of placing content such as text, images, etc. in rows and columns. HTML layouts provide a way to arrange web pages in well-mannered, well-structured, and responsive form or we can say that HTML layout specifies a way in which the web pages can be arranged. Web-page layout works with the arrangement of visual elements of an HTML document.

Use your <table> tag to create tables in HTML. A table consists of rows and columns, which can be set using one or more <tr>, <th> and <td> elements. A table row is defined by the <tr> tag. To set the table header, use the <th> tag. You can follow the code below.
<style>
    td {
      border: 1px solid black;
    }
    th {
        padding: 12px 10px;
      border: 1px solid black;
    }
</style>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body><table style="width:40%" border="2" cellspacing="0">
    <tr>
        <th colspan="5">Student Details</th>
      </tr>
    <tr>
      <td rowspan="6">Firstname</td>
      <td>JOHIR ISLAM </td>
      <td rowspan="6">Age</td>
      <td>120</td>
    </tr>

    <tr>
      <td>JOHIR KAN </td>
      <td>120</td>
    </tr>
    <tr>
        <td style="width:50%">JAHIRUL ISLAM </td>
        <td>100</td>
      </tr>
  </table>  
</body>
</html>

4 thoughts on “Html table assignment”

  1. Pingback: html dl - BWD

Leave a Comment