4

Below org code will bold the header row. how to remove it?

#+ATTR_HTML: :border 2 :rules all :frame border :class striped table-striped
|---+---|
| A | B |
|---+---|
| C | D |
|---+---|

Current output (A and B is in bold style):

enter image description here

3

The table elements in the top row are exported as table header cells (<th> markup), while the cells in other rows are normal table data cells (<td> markup).

Most browsers will render table header cells in bold.

You can do 2 things:

  1. If you want to get rid of all <th> elements, customize org-html-table-header-tags and substitute th for td. This is quite violent IMO.
  2. Add CSS styles for making both th and td render equally (read on).

For giving normal weight to table header cells, add the following at the top of your org document:

#+HTML_HEAD_EXTRA: <style type="text/css">th {font-weight: normal;}</style>

If you want this only for certain tables, you can define a class and only apply the CSS change to that class:

#+HTML_HEAD_EXTRA: <style type="text/css">.noboldheader th {font-weight: normal;}</style>

A standard table with bold headers:

|---+---|
| A | B |
|---+---|
| C | D |
|---+---|

A table with non-bold headers:

#+ATTR_HTML: :border 2 :rules all :frame border :class striped table-striped noboldheader
|---+---|
| A | B |
|---+---|
| C | D |
|---+---|
  • Great, it's works as expected. BTW, is it possible to add it to ATTR_HTML header for current table only? – lucky1928 Oct 19 '17 at 19:04
  • It is possible by defining a class for this feature. See edited answer. – Juancho Oct 20 '17 at 20:04

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.