Description Usage Arguments Value Author(s) See Also Examples
These functions allow us to describe HTML content that we want to
render. htmlDocument
is useful when we have a complete
HTML document to render
and htmlElement
is useful when we just have
an HTML element to render.
1 2 3 4 5 6 7 8 9 10 | htmlDocument(x, ...)
## S3 method for class 'character'
htmlDocument(x, css="", assets=NULL, ...)
## S3 method for class 'xml_document'
htmlDocument(x, css="", assets=NULL, ...)
htmlElement(x, ...)
## S3 method for class 'character'
htmlElement(x, css="", assets=NULL, ...)
## S3 method for class 'xml_node'
htmlElement(x, css="", assets=NULL, ...)
|
x |
Either a character vector or an XML object (from the xml2 package) describing HTML content. |
css |
A character vector describing CSS styling for the HTML content. |
assets |
Zero or more paths to external assets (e.g., image files) for the HTML content. |
... |
Arguments used by methods. |
An "htmlDocument"
object or an "htmlElement"
object.
Paul Murrell
1 | htmlElement("<p>test</p>")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.