0

I've been struggling with the background color of the Rmarkdown HTML output. I'm not a CSS or HTML expert, so a came asking for help. I want to divide the background into two or more colors (not only the chunks). For example, start with white, after some plots change it to blue, and after more tables/plots finish with red. I know that using:

<body style="background-color:#F5F5F5;">

I can change the color of the whole body, but it doesn't allow me to change it a second or third time in the same document. So I want to know if there is a way to have more than one background color and how to accomplish it.

Thanks in advance.

  • 2
    https://stackoverflow.com/questions/41030477/changing-chunk-background-color-in-rmarkdown is this what you're looking for? – seems Jul 18 '22 at 00:51
  • RMarkdown interprets HTML so you can wrap each section in a `
    ` tag and add a style property as you did with ``.
    – neilfws Jul 18 '22 at 01:21

0 Answers0