I would like to set the class for a table in html export, e.g.: <table class="table table-striped">

While it seems that setting some attributes for export of tables to HTML are possible: #+ATTR_HTML: :border 2 :rules all :frame border I could not find any documentation on setting the class. Is this possible?

1 Answer 1


You can treat the class attribute the same as other attributes and just set it:

#+ATTR_HTML: :border 2 :rules all :frame border :class striped table-striped

Which yielded (adding a newline for clarity):

<table border="2" cellspacing="0" cellpadding="6" rules="all" 
 frame="border" class="striped table-striped">
  • 1
    Thanks. Class was not among the set attributes so I did not think to try it. Jan 3, 2015 at 3:52
  • Can I use this with standard org-mode tables? #+CAPTION: title | column A | column B | |----------+----------| | foo | bar | |----------+----------| May 18, 2017 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.