Creating Professional Tables
Introduction
Welcome back to Document Structure and Layout! This is lesson five of seven, which means you are well past the halfway mark. So far, you have organized headings, generated a table of contents, built lists, and fine-tuned page margins. Each of those skills shapes a different part of a polished document, and now we add one more: tables. Tables let you present structured data — schedules, measurements, expense reports — in rows and columns that a reader can scan at a glance. By the end of this lesson, you will know how to build neatly aligned tables with borders, header rows, and column-spanning headings using the tabular environment.
Thinking in Rows and Columns
Before we write any code, let's consider what a table really is. A table is a grid of information arranged in rows (horizontal) and columns (vertical), where each box in the grid is called a cell. You see tables everywhere: class schedules, price lists, experiment results, and financial summaries all rely on rows and columns to make comparisons easy at a glance.
In LaTeX, tables are built one row at a time, left to right, inside a dedicated environment, and LaTeX handles all the spacing and alignment for you. The process will feel familiar if you recall how we used environments like itemize and enumerate for lists — you open an environment, supply content following a few simple rules, and close it.

The Tabular Environment
The environment for creating tables is called tabular. When you open it, you provide a column specification that tells LaTeX how many columns the table has and how each one should be aligned. The three basic column specifiers are:
l— left-aligned columnc— center-aligned columnr— right-aligned column
Inside the environment, you separate cells in a row with the ampersand character & and signal the end of each row with a double backslash \\. Here is a simple three-column table:
The column specification {l c r} creates three columns: the first left-aligned, the second centered, and the third right-aligned. Spaces inside the specification are optional and ignored by LaTeX, so {lcr} works identically. Each row contains exactly three cells separated by &, and every row ends with \\. The final row's \\ is technically optional, but including it is a good habit that prevents errors when you add more rows later.
When compiled, this code produces a clean, borderless grid where each column respects its alignment specifier. Names hug the left edge, subjects sit in the center, and scores align to the right.





