In my Code tags$p(HTML("...")
is shown in one line in the browser output.
And my question is: How can I achieve a browser output with the two lines tags$strong("strong text")
and p(" created with <strong>...</strong>")
compared to tags$p(HTML("...")
? Any hint how to avoid a line break?
ui <- fluidPage(
# HTML spelling and the output appears in one line
tags$p(HTML("
<strong>strong text</strong> created with the tag <strong>...</strong>)
")),
# The following two lines of code should appear in the same line in my browser
tags$strong("strong text"),
p(" created with <strong>...</strong>")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
In my Code tags$p(HTML("...")
is shown in one line in the browser output.
And my question is: How can I achieve a browser output with the two lines tags$strong("strong text")
and p(" created with <strong>...</strong>")
compared to tags$p(HTML("...")
? Any hint how to avoid a line break?
ui <- fluidPage(
# HTML spelling and the output appears in one line
tags$p(HTML("
<strong>strong text</strong> created with the tag <strong>...</strong>)
")),
# The following two lines of code should appear in the same line in my browser
tags$strong("strong text"),
p(" created with <strong>...</strong>")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
Share
Improve this question
asked 2 hours ago
tueftlatueftla
4351 gold badge4 silver badges20 bronze badges
3
|
1 Answer
Reset to default 1Not sure, but maybe you are looking for this (child tags):
library(shiny)
ui <- fluidPage(
# HTML spelling and the output appears in one line
tags$p(HTML("<strong>strong text</strong> created with the tag <strong>...</strong>)")),
# The following two lines of code should appear in the same line in my browser
p(tags$strong("strong text"), " created with tags$strong('...')")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
<p>
is the paragraph element, i.e. your are explicitly stating that it's content should be in a separate block, not on the same line. So ... don't usep()
?fluidPage(strong("foo"), "bar")
– margusl Commented 1 hour ago