I want to display some text with R shiny:
h4("Hello world! \t \t Hier I'm)
How can I add tab symbols into the text?
You can't really directly enter a tab character like you can in R. You can insert consecutive
values for spaces - this example puts 4 spaces into the space that you have above:
h4("Hello world! Hier I'm)
Alternatively you can add padding or margin to your CSS for h4
tags. See this link for explanation:
HTML: Tab space instead of multiple non-breaking spaces ("nbsp")?
The pre
tag preserves spaces and line breaks; and escaped characters like \t
are interpreted. For example : tags$pre(h4("Hello world! \t \t Hier I'm))
.