# NOT RUN {
html("img")
html("img",src="test.png")
html("div",class="element",id="first","Sisyphus")
html("div",class="element",id="first",.content="Sisyphus")
div <- html("div",class="element",id="first",linebreak=c(TRUE,TRUE))
content(div) <- "Sisyphus"
div
tag <- html("tag",linebreak=TRUE)
attribs(tag)["class"] <- "something"
attribs(tag)["class"]
tag
style(tag) <- c(color="#342334")
style(tag)
tag
style(tag)["bg"] <- "white"
tag
setStyle(tag,bg="black")
setStyle(tag,c(bg="black"))
c(div,tag,tag)
c(
c(div,tag),
c(div,tag,tag)
)
c(
c(div,tag),
div,tag,tag
)
c(
div,tag,
c(div,tag,tag)
)
content(div) <- c(tag,tag,tag)
div
css("background-color"="black",
color="white")
as.css(c("background-color"="black",
color="white"))
Hello <- "Hello World!"
Hello <- html("p",Hello,linebreak=c(TRUE,TRUE))
style(Hello) <- c(color="white",
"font-size"="40px",
"text-align"="center")
Link <- html("a","More examples here ...",
href="http://elff.eu/software/memisc",
title="More examples here ...",
style=css(color="white"),
linebreak=c(TRUE,FALSE))
Link <- html("p"," (",Link,")",linebreak=c(TRUE,TRUE))
style(Link) <- c(color="white",
"font-size"="15px",
"text-align"="center")
Hello <- html("div",c(Hello,Link),linebreak=c(TRUE,TRUE))
style(Hello) <- c("background-color"="#160666",
padding="20px")
Hello
show_html(Hello)
# }
Run the code above in your browser using DataLab