Uses CSS grid. Basic setup with
#terminal { --rows: 25; --cols: 80; display: grid; grid-template-rows: repeat(var(--rows), 1em); grid-template-cols: repeat (var(--cols), 1em); }
gives a grid of addressable cells.