See attached image, cell A3 has default alignment (bottom) and I always find myself changing alignment to the top (like cell B3), because it seems much easier to read to me.

I understand there is a good reason behind that fits most users (I'm not a power user and not working in accounting), but I can't find the answer.


enter image description here

  • 1
    Yes, very annoying. It gives the impression of empty cells when scanning top to bottom. I can only assume this feature was written by a spy for Microsoft to drive customers to Excel. I'll be interested to see convincing answers! Jun 23 at 11:40

Because this is the default vertical alignment for tables. You can see the Specs for Visual Formatting Model at W3.org or Vertical Align at MDN

The following values only have meaning with respect to a parent inline element, or to the strut of a parent block container element.

In the following definitions, for inline non-replaced elements, the box used for alignment is the box whose height is the 'line-height' (containing the box's glyphs and the half-leading on each side, see above). For all other elements, the box used for alignment is the margin box.

baseline Align the baseline of the box with the baseline of the parent box. If the box does not have a baseline, align the bottom margin edge with the parent's baseline.

enter image description here

As for WHY was this default chosen, it's because it's easier (or at least it was) to read adjacent content by considering the end of each cell. This comes from old accounting books, see example below, you'll see the amounts are at the baseline of the content of left column (which is multiline).

enter image description here

However, keep in mind that this behavior is agent dependant, meaning that browsers, programming languages and software can declare whichever default they want. For example, Latex aligns to middle and old MS DOS software usually aligned to top

  • Thanks for this great answer @Devin! So I understand that it's because spreadsheets' main task is accounting and it makes more sense (thanks for the image). I was asking specifically about Excel and Google Sheets, so I don't think it's related to CSS specifications and implementations, but it's also good context. Jun 24 at 9:38
  • Google Sheets is a web application by definition and Google always standarized their products to W3. Excel probably took the same route based on old accounting books as well. They had to choose one type of alignment, so I guess they chose one that already had some validation (old books or w3). That's why I mentioned MS DOS as well: pre-WWW tables were top aligned, so it seems the Web's cultural impact influenced many GUI decisions
    – Devin
    Jun 24 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.