Given an HTML string, the css_inline() function will render that into HTML with CSS inlined into the style attribute of HTML tags.

css_inline(html)

Arguments

html

HTML provided as a string.

Value

A character vector of length one which contains the transformed HTML text.

Examples


# Take an HTML string and inline the CSS into the tags
css_inline(html = "<style>div{color:blue;}</style><div/>")
#> [1] "<div style=\"color: blue;\"></div>"