title: How to change appearance of table header row with R formattable package
body: <p>I'm using the formattable package in R to produce a HTML table. I can use formatter to customise the look of data values in in my table e.g. font-size, color etc. But I can't work out how to alter the appearance of the table header row.I can alter the actual column names using col.names(), but haven't been able to change their appearance.</p>
  
  <p>For example, in the table below how can I change the text color or background color in the header row (mpg, cyl, disp etc.)</p>
  
  <p>Ultimately, I plan to use formattable::as.htmlwidget() and library(webshot) to grab an image file of the table, see
  <a href="https://stackoverflow.com/questions/38833219/command-for-exporting-saving-table-made-with-formattable-package-in-r">Command for exporting/saving table made with Formattable package in R</a></p>
  
  <p>Thanks</p>
  
  <pre><code>library(formattable)
  
  formatRed &lt;- formatter("span"
      , style = x ~ style(color = ifelse(x &gt; 21 , "red", "black")))
  
  formatSize &lt;-  formatter("span"
      , style = x ~ style("font-size" = "8px"))
  
  exTb &lt;- formattable(head(mtcars, 5)
      , table.attr = "class='table table-striped'"
      , list(mpg = formatRed
          , wt = formatSize)
  )
  
  exTb
  </code></pre>