如何在 shiny 中插入可点击的 link 到 html 标签?

How to insert clickable link to html tag in shiny?

我使用带有 fluidPage() 的 html 标签在我闪亮的应用程序中添加了页脚:

tags$footer(HTML(sprintf("For further information visit www.website.com", 
                         align = "center", 
                         style = "position:absolute; width: 100%; color: white;")

我需要帮助才能使 link 可点击。有人可以帮我解决这个例子中的正确语法问题吗?

此外,任何有关在 shiny 中了解 HTML 和 CSS 实现和语法的更多建议都将非常有用。

您可以使用 HTML a Tag:

library(shiny)

ui <- fluidPage(
  tags$footer(
    "For further information visit ",
    tags$a(
      "www.google.com",
      target = "_blank",
      href = "https://www.google.com/"
    ),
    style = "position: absolute; width: 100%; color: black; text-align: center;"
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)