A Tool to Create HTML Tables

A tool to create and style HTML tables with CSS. These can be exported and used in any application that accepts HTML (e.g. 'shiny', 'rmarkdown', 'PowerPoint'). It also provides functions to create CSS files (which also work with shiny).

CRAN version Travis-CI Build Status Coverage Status


The goal of tableHTML is to create easily CSS-ible HTML tables. It is compatible with any application that uses HTML / CSS and has successfully been tested with:

  • Shiny
  • Rmarkdown
  • Microsoft Office

The package follows the tidyverse philosophy and uses the pipe operator %>% to chain functions together. Apart from applying standard CSS to columns / rows, the package offers the ability to add CSS conditionally (e.g. like column colour ranks) and to create CSS files for shiny.


To install the latest released version from CRAN you just need to run on your console:


To install the development version you need to have the devtools package installed. To install devtools type in your console:


Then to install tableHTML run the following on your console:



By typing on your console:


you can see a first example of an HTML table!

Links - Cran / Tutorial / Examples

To find out about all the functions and how to use the package with shiny you can visit the online tutorial.

To see a gallery of examples you can visit the examples page.

To use conditional formatting or colour ranking for your table you can visit the conditional formatting vignette.

For a tutorial on how to build a CSS file and how to use that in shiny (in a fast way) you can visit the make_css and shiny link.

To see the released version you can visit CRAN.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.0 by Theo Boutaris, a year ago


Report a bug at https://github.com/LyzandeR/tableHTML/issues

Browse source code at https://github.com/cran/tableHTML

Authors: Theo Boutaris [aut, cre, cph] , Clemens Zauchner [aut] , Dana Jomar [aut]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports htmltools, magrittr, shiny, jpeg, png, webshot

Suggests testthat, knitr, rmarkdown, RColorBrewer

Suggested by implicitMeasures.

See at CRAN