HTML TABLE

Fazzey's world



HTML Table

  • HTML table can allows web developers to arrange data into rows and columns. 
  • A table in HTML, use the <table> tag. Within this table tag, using the <tr>, <th>, and <td> tags.
  • Every table can create between <td> and </td> are the content of the table cell, There are:             
    1. <table>        -    It establishes a table.
    2. <tr>             -    It describes a table row.
    3. <th>            -     It defines a table header cell.
    4. <td>             -    It describes a table cell.
    5. <caption>     -   The caption of the table is defined.
    6. <colgroup>   -   It is a collection of one or more table columns for formatting.
    7. <col>            -   To provide column properties for each column, use it along with the colgroup element.
    8. <tbody>        -    It is used to organise the table's body content.
    9. <thead>        -    It is used to organise a table's header information.
    10. <tfooter>      -    It is used to organise table footer material.

    Example:


      <!DOCTYPE html>
      <html
      <body>
      <table>
      <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Age</th>
      </tr>
      <tr>
      <td>Fareen</td>
      <td>Sheriff</td>
      <td>19</td>
      </tr>
      <tr>
      <td>Roshan</td>
      <td>Beevi</td>
      <td>20</td>
      </tr>
      <tr>
      <td>pooja</td>
      <td>sree</td>
      <td>19</td>
      </tr
      </table>
      </body>  
      </html>


    Output:



    HTML Table Cell

    • In each table cell can create by <td>....</td> tags. 
    • The <td> tag stands for table data, are the content of the table cell.

      Example:

       
        <!DOCTYPE html>
        <html>
        <style>
        table, td {
          border1px solid black;
        } 
        </style>
        <body>
        <h2>HTML Table cells</h2>
        <table style="width50%">
        <tr>
        <td>Python</td>
        <td>Java</td>
        <td>C++</td>
        </tr>
        </table>
        <p>We can added the kinds of programming languages to the table.</p>
        </body>
        </html>


      Output:





      More topic in HTML

      Our website uses cookies to enhance your experience. Learn More
      Accept !

      GocourseAI

      close
      send