1. Learn
  2. /
  3. Courses
  4. /
  5. Communicating with Data in the Tidyverse

Connected

Exercise

Change style attributes of text elements

With CSS, it's easy to change the appearance of text in your report. In this exercise, you're going to change the font to a font with serifs, in accordance with the style of your plots. You're also going to try out a few other CSS selectors in order to change some colors and font sizes in your report. For example, the font of the R code elements is currently a little on the larger side, compared to the surrounding prose. You'll use CSS to reduce their size.

Here, all of your CSS should go inside the <style> tags above the Summary. In the next exercise, you'll learn how to reference an external CSS file using the YAML header. If you need more help regarding the styling of text, you can refer to the Mozilla Developer reference.

Instructions

100 XP
  • On line 17, change the font-family of all the text in your report (including headers, except R code chunks) to "Bookman", serif.
  • On line 21, change the color of the body text to a slight grey (#333333).
  • On line 24, change the color of all links to red.
  • On line 27, reduce the font of the R code elements, which are wrapped in pre HTML tags, to 10px.