tagAppendChild | R Documentation |
Modify the contents (aka children) of a tag object.
tagAppendChild(tag, child, .cssSelector = NULL)
tagAppendChildren(tag, ..., .cssSelector = NULL, list = NULL)
tagSetChildren(tag, ..., .cssSelector = NULL, list = NULL)
tagInsertChildren(tag, after, ..., .cssSelector = NULL, list = NULL)
tag |
a tag object. |
child |
A child element to append to a parent tag. |
.cssSelector |
A character string containing a CSS selector
for targeting particular (inner) tags of interest. At the moment, only a
combination of
type (e.g,
|
... |
a collection of |
list |
Deprecated. Use |
after |
an integer value (i.e., subscript) referring to the child position to append after. |
tagAppendAttributes()
, tagQuery()
html <- div(a(), h1())
tagAppendChild(html, span())
tagAppendChild(html, .cssSelector = "a", span())
tagAppendChildren(html, span(), p())
tagAppendChildren(html, .cssSelector = "a", span(), p())
tagSetChildren(html, span(), p())
tagInsertChildren(html, after = 1, span(), p())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.