如何使用htmltools语法合并dec图标

如何使用htmltools语法合并dec图标,html,css,shiny,Html,Css,Shiny,我需要显示一个图标(◼) 使用dec但我的html技能非常有限 我正在尝试和需要调整的内容: htmltools::tags$span("I will display" , style="◼"), htmltools::tags$span("I will display" , style="#9724;"), htmltools::tags$style("I will display" , style="◼"), htmltools::tags$sty

我需要显示一个图标(◼) 使用
dec
但我的html技能非常有限

我正在尝试和需要调整的内容:

htmltools::tags$span("I will display"  , style="◼"),
htmltools::tags$span("I will display"  , style="#9724;"),
htmltools::tags$style("I will display" , style="◼"),
htmltools::tags$style("I will display" , style="#9724;"),
如何使用shiny的标记系统显示上面的图标

编辑:已更新。我需要图标成为
DT
标题的一部分

datatable(
  head(iris),
  caption = htmltools::tags$caption(
    style = 'caption-side: bottom; text-align: center;',
    'Table 2: ', 
htmltools::tags$span("I will display"  , style="◼"),
htmltools::tags$span("I will display"  , style="#9724;"),
htmltools::tags$style("I will display" , style="◼"),
htmltools::tags$style("I will display" , style="#9724;"),
  )
)

要在shiny中添加图标,可以使用
ìcon

library(shiny)
ui <- fluidPage(
  htmltools::tags$span("I will display", icon("square"))
)
server <- function(input, output) {
}
shinyApp(ui, server)
}
库(闪亮)

ui
htmltools
默认情况下转义HTML内容,因此HTML实体中的符号将以如下方式转义:

> htmltools::span("&#9724;")
<span>&amp;#9724;</span>
或在不转义HTML的情况下将符号包含在字符串中:

DT::datatable(
  head(iris),
  caption = htmltools::tags$caption(
    style = 'caption-side: bottom; text-align: center;',
    'Table 2: ', 
    htmltools::tags$span("I will display ◼ or \u25fc")
  )
)

感谢您的编辑。不幸的是,图标不起作用,否则我会使用它们。我需要在DT标题中使用它们。
DT::datatable(
  head(iris),
  caption = htmltools::tags$caption(
    style = 'caption-side: bottom; text-align: center;',
    'Table 2: ', 
    htmltools::tags$span("I will display ◼ or \u25fc")
  )
)