I am using Emacs' Org mode to scribble up some notes which all of which are being exported to HTML.

I often need to insert a lot of paragraphs verbatim while citing other research papers. The #+BEGIN_QUOTE ... #+END_QUOTE environment is perfect for that.

However, I would also like the quotes to be surrounded by a gray box snapped tight around the quote.

e.g. almost exactly like how the poem Twinkle Twinkle Little Star appears below.

Twinkle, twinkle, little star,

How I wonder what you are!

Up above the world so high,

Like a diamond in the sky.

2 Answers 2


You can achieve this by simply adding the following style to your org file:

#+HTML_HEAD_EXTRA: <style type="text/css"> blockquote {background:#EEEEEE; padding: 3px 13px}</style>

You can also put it in a css file (e.g. yourStyle.css):

blockquote {
    background: #EEEEEE;
    padding: 3px 13px;

and include it

#+HTML_HEAD: <link rel="stylesheet" href="yourStyle.css">

EDIT: added type="text/css" as suggested by user16762


The #+HTML_HEAD_EXTRA answer given by theldoria will work, but it will fail W3C validation because style is missing a type specification. It should strictly be

#+HTML_HEAD_EXTRA: <style type="text/css"> blockquote {background:#EEEEEE; padding: 3px 13px}</style>

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.