Welcome Guest! (App Version 3.1)

websitnero logo name

HTML Tables

Overview

  • <table> tag is used to make tables in HTML.
  • colspan="3" will merge 3 columns horizontally.
  • rowspan="2" will merge 2 columns vertically

How to make tables in HTML

<table> tag is used to represent data in tabular format.

A table consists of rows and columns. There are many rows -- each row can contain 1 or more columns.

  • table - contains full table
  • thead - contains table head
  • tbody - contains table body
  • tr - contains table row
  • th - contains column headings
  • td - contains talbe columns

<table>
 <thead>
  <tr><th>Id</th><th>Name</th><th>Age</th></tr>
 </thead>
 <tbody>
  <tr><td>1</td><td>James</td><td>23</td></tr>
  <tr><td>2</td><td>Rosy</td><td>19</td></tr>
  <tr><td>3</td><td>Albert</td><td>45</td></tr>
 </tbody>
</table>

Example

<table>
  <thead>
    <tr><th>Name</th><th>Age</th></tr>
  </thead>
  <tbody>
   <tr><td>George</td><td>23</td></tr>
   <tr><td>Tina</td><td>19</td></tr>
   <tr><td>Lara</td><td>43</td></tr>
  </tbody>
</table>
Further Reading

1. <table>: The Table element

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.