DEV Community

Discussion on: How to build a calendar with CSS Grid

Collapse
 
sandwich_hlp profile image
Michael Cohen

Semantics! :) Tables are for representing tabular data, which this style of calendar most certainly is. Each row is a separate week; each column a day of the week. As a bonus, even if the CSS doesn't load properly, a table will display a calendar in an eminently-sensible layout, whereas a calendar built just with semantically-meaningless <div>s will just look like a mess of text strings.

Remember, the kick-back against HTML tables was targeted at their being (mis)used for page layout, NOT against their use with tabular data! :)