Skip to contents

The text_style() function adjusts the style of text in a tag element.

Usage

text_style(x, style)

Arguments

x

A tag element or .style pronoun.

style

A character string specifying the text style. One of,

  • "italic"

  • "normal"

Value

An object of the same type as x.

Examples


library(htmltools)

p(
  .style %>%
    text_style("italic"),
  "Italic text"
)
#> <p class="fst-italic">Italic text</p>

p(
  .style %>%
    text_style("normal"),
  "Normal text"
)
#> <p class="fst-normal">Normal text</p>