Aligning tables in the center?


First, be sure to be kind to folks here by asking your questions as a reproducible example (looks like you had a newline+backticks issue).

I personally like to use kableExtra for simple table styling. So your line with the table will be:

table(tab1) %>% 
  kable('html') %>% 
  kable_styling(bootstrap_options = "striped", full_width = F)

Check out more options here: Create Awesome HTML Table with knitr::kable and kableExtra Hao Zhu 2018-01-15

If you want super granular control over options, check out the custom css options you have with rmarkdown and slidy.