Description Usage Arguments Details See Also Examples
Creates a function that returns a function that can be used to generate HTML elements. See examples for usage.
1 | makeHTMLTag(tag, ...)
|
tag |
the HTML tag to use. |
... |
a collection of named and unnamed arguments; named arguments are parsed as attributes of the tag, unnamed arguments are pasted together into the inner data of the tag. |
This function returns a function that can be called as an
HTML tag generating function. For example, by calling
p <- makeHTMLTag("p")
, we can generate a function
that interprets all named arguments as attributes, and all
unnamed arguments as 'data', which is generated for a
p
HTML tag.
1 2 3 4 | div <- makeHTMLTag("div")
my_class = "orange"
x <- "some text"
div( class=my_class, id="hello", "This is ", x )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.