Tables are used on websites for arranging and displaying data in a grid format. The <table> tag defines an HTML table which consists of rows <tr> and cells <td> or <th>. Complex tables can also include <caption>, <col>, <colgroup>, <thead>, <tfoot>, and <tbody> elements. Attributes like bgcolor, border, cellpadding and cellspacing control the table appearance.