HTMLElement.RdHTML element builder
HTML element builder
It is up to the user to escape text if necessary. See esc() and attesc()
functions to help with this, although if you are working within shiny,
then this should happen automatically.
Named arguments are considered attributes and will overwrite existing attributes with the same name. Set to NULL to delete the attribute. Set to NA to make this a bare attribute without a value.
Unnamed arguments are appended to the list of child nodes. These
should be text, other HTMLElements or any ojbect that can be represented
as a single text string using "as.character()". To be specific about
where in the child list a node will be placed, use $append()
namename of node e.g. "div"
attribsnamed list of attributes of this node
childrenlist of immediate children of this node
a()HTMLElement$a(..., href, hreflang, media, rel, target, type)
abbr()HTMLElement$abbr(...)
address()HTMLElement$address(...)
area()HTMLElement$area( ..., alt, coords, href, hreflang, media, rel, shape, target, type )
article()HTMLElement$article(...)
aside()HTMLElement$aside(...)
audio()HTMLElement$audio( ..., autoplay, controls, loop, mediagroup, muted, preload, src )
b()HTMLElement$b(...)
base()HTMLElement$base(..., href, target)
bdi()HTMLElement$bdi(...)
bdo()HTMLElement$bdo(...)
big()HTMLElement$big(...)
blockquote()HTMLElement$blockquote(..., cite)
body()HTMLElement$body( ..., onafterprint, onbeforeprint, onbeforeunload, onhashchange, onmessage, onoffline, ononline, onpagehide, onpageshow, onpopstate, onredo, onresize, onstorage, onundo, onunload )
br()HTMLElement$br(...)
button()HTMLElement$button( ..., autofocus, disabled, form, formaction, formenctype, formmethod, formnovalidate, formtarget, name, type, value )
canvas()HTMLElement$canvas(..., height, width)
caption()HTMLElement$caption(...)
cite()HTMLElement$cite(...)
code()HTMLElement$code(...)
col()HTMLElement$col(..., span)
colgroup()HTMLElement$colgroup(..., span)
command()HTMLElement$command(..., checked, disabled, icon, label, radiogroup, type)
datalist()HTMLElement$datalist(...)
dd()HTMLElement$dd(...)
del()HTMLElement$del(..., cite, datetime)
details()HTMLElement$details(..., open)
dfn()HTMLElement$dfn(...)
dialog()HTMLElement$dialog(..., open)
div()HTMLElement$div(...)
dl()HTMLElement$dl(...)
dt()HTMLElement$dt(...)
em()HTMLElement$em(...)
embed()HTMLElement$embed(..., height, src, type, width)
fieldset()HTMLElement$fieldset(..., disabled, form, name)
figcaption()HTMLElement$figcaption(...)
figure()HTMLElement$figure(...)
footer()HTMLElement$footer(...)
form()HTMLElement$form( ..., accept_charset, action, autocomplete, enctype, method, name, novalidate, target )
h1()HTMLElement$h1(...)
h2()HTMLElement$h2(...)
h3()HTMLElement$h3(...)
h4()HTMLElement$h4(...)
h5()HTMLElement$h5(...)
h6()HTMLElement$h6(...)
head()HTMLElement$head(...)
header()HTMLElement$header(...)
hgroup()HTMLElement$hgroup(...)
hr()HTMLElement$hr(...)
html()HTMLElement$html(..., manifest, xml..lang, xmlns)
i()HTMLElement$i(...)
iframe()HTMLElement$iframe(..., height, name, sandbox, seamless, src, srcdoc, width)
ilayer()HTMLElement$ilayer(...)
img()HTMLElement$img(..., alt, height, ismap, longdesc, src, usemap, width)
input()HTMLElement$input( ..., accept, alt, autocomplete, autofocus, checked, dirname, disabled, form, formaction, formenctype, formmethod, formnovalidate, formtarget, height, list, max, maxlength, min, multiple, name, pattern, placeholder, readonly, required, size, src, step, type, value, width )
ins()HTMLElement$ins(..., cite, datetime)
kbd()HTMLElement$kbd(...)
keygen()HTMLElement$keygen(..., autofocus, challenge, disabled, form, keytype, name)
label()HTMLElement$label(..., for., form)
legend()HTMLElement$legend(...)
li()HTMLElement$li(..., value)
link()HTMLElement$link(..., disabled, href, hreflang, media, rel, sizes, type)
main()HTMLElement$main(...)
map()HTMLElement$map(..., name)
mark()HTMLElement$mark(...)
marquee()HTMLElement$marquee( ..., align, behavior, bgcolor, direction, height, hspace, loop, scrollamount, scrolldelay, truespeed, vspace, width )
menu()HTMLElement$menu(..., label, type)
meta()HTMLElement$meta(..., charset, content, http_equiv, name)
meter()HTMLElement$meter(..., form, high, low, max, min, optimum, value)
nav()HTMLElement$nav(...)
noscript()HTMLElement$noscript(...)
object()HTMLElement$object( ..., archive, codebase, codetype, data, declare, form, height, name, standby, type, usemap, width )
ol()HTMLElement$ol(..., reversed, start, type)
optgroup()HTMLElement$optgroup(..., disabled, label)
option()HTMLElement$option(..., disabled, label, selected, value)
output()HTMLElement$output(..., for., form, name)
p()HTMLElement$p(...)
param()HTMLElement$param(..., name, value)
pre()HTMLElement$pre(...)
progress()HTMLElement$progress(..., form, max, value)
q()HTMLElement$q(..., cite)
rp()HTMLElement$rp(...)
rt()HTMLElement$rt(...)
ruby()HTMLElement$ruby(...)
samp()HTMLElement$samp(...)
script()HTMLElement$script(..., async, charset, defer, src, type)
section()HTMLElement$section(...)
select()HTMLElement$select( ..., autofocus, disabled, form, multiple, name, required, size )
small()HTMLElement$small(...)
source()HTMLElement$source(..., media, src, type)
span()HTMLElement$span(...)
strong()HTMLElement$strong(...)
style()HTMLElement$style(..., disabled, media, scoped, type)
sub()HTMLElement$sub(...)
summary()HTMLElement$summary(...)
sup()HTMLElement$sup(...)
table()HTMLElement$table(..., border)
tbody()HTMLElement$tbody(...)
td()HTMLElement$td(..., colspan, headers, rowspan)
template()HTMLElement$template(..., content)
textarea()HTMLElement$textarea( ..., autofocus, cols, dirname, disabled, form, label, maxlength, name, placeholder, readonly, required, rows, wrap )
tfoot()HTMLElement$tfoot(...)
th()HTMLElement$th(..., colspan, headers, rowspan, scope)
thead()HTMLElement$thead(...)
time()HTMLElement$time(..., datetime, pubdate)
title()HTMLElement$title(...)
tr()HTMLElement$tr(...)
track()HTMLElement$track(..., default, kind, label, src, srclang)
tt()HTMLElement$tt(...)
ul()HTMLElement$ul(...)
var()HTMLElement$var(...)
video()HTMLElement$video( ..., autoplay, controls, height, loop, mediagroup, muted, poster, preload, src, width )
wbr()HTMLElement$wbr(...)
new()Initialise HTMLElement
HTMLElement$new(name, ...)
namename of node. e.g. "div"
...Further arguments are attributes and children of this node. See HTMLElement$update()
self
update()Updates the attributes and children.
HTMLElement$update(...)
...attributes and children to add to this node
self
append()Append a child node at the specified position
HTMLElement$append(..., position = NULL)
positionby default at the end of the list of children nodes can be used to set location index
self
add()Simultaneous create an HTML element and add it as a child node
HTMLElement$add(name, ...)
namename of node to create
...attributes and children of this newly created node
In contrast to most other methods, $add() returns
the newly created element, not the document
remove()Remove child objects at the given indicies
HTMLElement$remove(indicies)
indiciesindicies of the children to remove
as_character_inner()Recursively convert this HTMLElement and children to text
HTMLElement$as_character_inner(..., depth = 0)
...ignored
depthrecursion depth
single character string
as_character()Recursively convert this HTMLElement and children to text
HTMLElement$as_character(..., depth = 0, include_declaration = FALSE)
...ignored
depthrecursion depth. default: 0
include_declarationInclude the leading XML declaration? default: FALSE
single character string
print()Print the HTML string to the terminal
HTMLElement$print(..., include_declaration = FALSE)
...Extra arguments passed to HTMLElement$as_character()
include_declarationInclude DOCTYPE declaration? default: FALSE
save()Save HTML
HTMLElement$save(filename, include_declaration = FALSE, ...)
filenamefilename
include_declarationInclude DOCTYPE declaration? default: FALSE
...Extra arguments passed to HTMLElement$as_character()
copy()Make a deep copy of this node and its children
HTMLElement$copy()
if (FALSE) { HTMLElement$new('div', class = ".big", "DIV contents") }