Verbatim org tables exported to html

Homepage > Verbatim org tables

I recently found a need for visible dividers (or "rules") between the rows and columns of an org table exported to html. The most recent discussion of this that I could find on gmane was this from 2007, which concluded that such rules weren't supported, so here's a kludgey workaround I found. It isn't pretty, but it works when you really need visual separation of rows and columns.

Put this in your .org file:

#+BEGIN_HTML
<pre>
|----+----+----+----|
| a0 | b0 | c0 | d0 |
|----+----+----+----|
| a1 | b1 | c1 | d1 |
|----+----+----+----|
| a2 | b2 | c2 | d2 |
|----+----+----+----|
</pre>
#+END_HTML

And you'll get this when you export as html:

|----+----+----+----|
| a0 | b0 | c0 | d0 |
|----+----+----+----|
| a1 | b1 | c1 | d1 |
|----+----+----+----|
| a2 | b2 | c2 | d2 |
|----+----+----+----|

Author: Bill White <minutiae@gmail.com>

Date: 2009-09-12 18:28:31 CDT

HTML generated by org-mode 6.29a in emacs 23