What is a Table?

A table in general, is an arrangement of data or information in rows and columns. A Table can be created using HTML tag. The tag <table> defines an HTML table. Each row of a HTML table is defined with a <tr> tag and each cell or data is defined with a <td> tag. Header of a HTML table is defined with a <th> tag.

Steps to Create an HTML Script using Notepad:

If you are really interested to learn or test a HTML script, then here are the steps. There are plenty of tools to create webpages using HTML codes. But I am going to give you the most simple tool to learn HTML.The tool, you will need to use a text editor like “Notepad (for Windows).”

Steps :

  1. Open Notepad
  2. Create a New Document (copy and paste the code given below)
  3. Save File in HTML
  4. View the saved File in a Web browser

The Output

List of Students and Departments

Lsat Name First Name Department
Sinha Susmita Library Science
Deb Antara Commerce
Dhar Tanushree Law

Note: You will notice that by default, the text in <td> elements are left-aligned and regular.

The Code

<html>
<body>
<h3><Center>List of Students and Departments</Center></h3>
<table style="width:100%">
  <tr>
    <th>Lsat Name</th>
    <th>First Name</th>
    <th>Department</th>
  </tr>
  <tr>
    <td>Sinha</td>
    <td>Susmita</td>
    <td>Library Science</td>
  </tr>
  <tr>
    <td>Deb</td>
    <td>Antara</td>
    <td>Commerce</td>
  </tr>
  <tr>
    <td>Dhar</td>
    <td>Tanushree</td>
    <td>Law</td>
  </tr>
</table>
</body>
</html>