<?xml version="1.0" encoding="utf-8"?>

The <table> tag

The <table> tag

Tables are an excellent choice for displaying data in columns and rows. They allow users to quickly scan, compare, and analyze any type of information, ranging from text and figures to images.

At its most basic level, a table is built using the <table> element and one or more of the <tr>, <th> and <td> elements to define rows, headings, and cells respectively.

Pro Tip: Avoid using the <div> tag for tabular data — although it can separate content into blocks, its purpose is to create layouts.

Improve your UX & Product skills with interactive courses that actually work