Skip to contents

Constructs a full HTML document. It does not modify or validate its contents.

document() is used for full-page responses, and should not be used for partials, fragments or nested templates.

Usage

document(...)

Arguments

...

user-supplied content

Value

An htmltools::tagList, consisting of a doctype declaration, an tag, and user-supplied content.

See also

Examples

document(
     htmltools::tags$head(
         htmltools::tags$title("Home")
     ),
     htmltools::tags$body(
         htmltools::tags$h1("Hello")
     )
)
#> <!DOCTYPE html>
#> <html>
#>   <body>
#>     <h1>Hello</h1>
#>   </body>
#> </html>