The html() function

Use the exibble dataset to create a gt table. When adding a title through tab_header(), we’ll use the html() helper to signify to gt that we’re using HTML formatting.

exibble |>
  dplyr::select(currency, char) |>
  gt() |>
  tab_header(title = html("<em>HTML</em>"))
HTML
currency char
49.950 apricot
17.950 banana
1.390 coconut
65100.000 durian
1325.810 NA
13.255 fig
NA grapefruit
0.440 honeydew