6.1 Apply custom CSS
For beginners, it is extremely important to understand selectors and precedence of rules in CSS, otherwise you may be confused why your custom CSS rules do not work as expected (they may not have enough precedence).
To include one or multiple custom stylesheets in an Rmd document, you can use the
css option, e.g.,
Alternatively, you can use a
css code chunk to embed the CSS rules directly in your Rmd document, e.g.,
The chunk option
echo = FALSE means the CSS code will not be displayed verbatim in the output, but a
<style> tag containing the CSS code will be generated to the HTML output file.