I have a basic ordered list in org mode. After exporting to HTML it takes the default class that org mode assigned:

<ol class="org-ol">

For some lists, however, I'm trying to assign a custom class (like "special_list", for example).

<ol class="special_list">

The org mode documentation says you could add an attribute in this fashion:

#+ATTR_HTML: :class special_list 1. First point 2. Second point

But that doesn't seem to work in this case. Do I have the syntax wrong, or is there a different method for applying custom classes?

1 Answer 1


The :class attribute does not seem to apply to lists.

However, you can wrap your list in a custom div this way:

1. One
2. Two

This will produce the following HTML:

<div class="pepe">
 <ol class="org-ol">

So you can use a CSS selector for that list such as div.pepe ol.

Your Answer

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

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