3

I am building a HTML money table. It is meant to display my payments and income for every year, month, week and day. The rows are grouped by month using <tbody> tags for each month in which the last row of tbody contains a total summary of that month:

<table id="paymentHistoryOverview" class="data money">
  <colgroup>
    <col class="date">
    <col class="description">
    <col class="money">
  </colgroup>
  <thead>
    <tr>
      <th>Date</th>
      <th>Description</th>
      <th>Amount</th>
    </tr>
  </thead>
  <tbody>
    <tr><th colspan="3">January 2013</th>
    <tr>
      <td>2013-04-05</td>
      <td>Salary</td>
      <td>100.00</td>
    </tr>
    <tr>
      <td>2013-04-08</td>
      <td>Rent</td>
      <td>-80.00</td>
    </tr>
    <tr>
      <td>Summary for january</td>
      <td>&euro 20.00</td>
    </tr>
  </tbody>
</table>

As you can see every month contains some sort of header and footer. Is there a way to semantically describe something like this to give it extra value? If it isn't, would <strong> in each summary cell be a valid semantic solution?

Alohci
  • 78,296
  • 16
  • 112
  • 156
Chris Visser
  • 1,607
  • 12
  • 24
  • This is a non-constructive question, because it asks for a “semantic way” to “describe something like this”. There is no purpose specified – “to give it extra value” is not a description. – Jukka K. Korpela Apr 06 '13 at 06:03
  • @JukkaK.Korpela Semantics are very important for usability and accessibility. The asker wants to know how to provide greater semantic emphasis to the total of each row. – Sean Mar 14 '22 at 01:49

1 Answers1

-1

You could place each month in its own <tbody> to give it semantic grouping. This well-liked post says it is valid to do so.

Community
  • 1
  • 1
mr_plum
  • 2,448
  • 1
  • 18
  • 31
  • Although I didn't think about it, it is a better solution to my problem in terms of grouping on a semantic level. But still, it doesn't give the summaries more value then the normal rows. Still an up-vote though :) – Chris Visser Apr 05 '13 at 23:33
  • 2
    The question says “The rows are grouped by month using `` tags” and the (admittedly rudimentary) example illustrates this, so this answer suggests something already in use, without addressing the question asked (about “footers”). – Jukka K. Korpela Apr 06 '13 at 06:00