XHTML allows tables to span columns and rows to create more complex layouts. Spanning columns uses the colspan attribute to make a cell stretch across multiple columns. Spanning rows uses the rowspan attribute to make a cell stretch across multiple rows. This allows non-uniform grids to group or split cells across rows and columns.