One option is to add CSS within your org file, which will also avoid having to insert a hline
between each row in the table. Table attributes can be customized further, but to get horizontal borders for all rows the following could be used:
#+HTML_HEAD: <style type="text/css">
#+HTML_HEAD: tr {border-bottom: 1px solid;}
#+HTML_HEAD: </style>
| A | B | C |
|-----+-----+-----|
| 123 | 123 | 123 |
| 4 | 5 | 5 |
| 3 | 2 | 1 |
| | | |
As mentioned it the org manual, this will override any settings from org-html-table-default-attributes
.
To add borders for only certain rows, the CSS can be modified to use nth-child
. For example, to add a border to only the first 3 rows:
#+HTML_HEAD: <style type="text/css">
#+HTML_HEAD: tr:nth-child(-n+3) {border-bottom: 3px solid;}
#+HTML_HEAD: </style>
pdf
orhtml
?