2.1 Generating HTML Strings
(require scribble/html/html) | package: scribble-html-lib |
procedure
(doctype s) → procedure?
s : (or/c string 'html 'xhtml)
> (output-xml (doctype "?")) <!DOCTYPE ?>
> (output-xml (doctype 'html)) <!DOCTYPE html>
> (regexp-split #rx"\n|((?<=\") (?=\"))" (xml->string (doctype 'xhtml)))
'("<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
"")
procedure
(xhtml content ...) → procedure?
content : outputable/c
> (regexp-split #rx"\n|((?<=\") (?=\"))" (xml->string (xhtml "Hello")))
'("<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">Hello</html>"
"")
> (output-xml (title "The Book")) <title>The Book</title>
procedure
(base v ...) → procedure?
v : outputable/c
procedure
(meta v ...) → procedure?
v : outputable/c
procedure
(link v ...) → procedure?
v : outputable/c
procedure
(hr v ...) → procedure?
v : outputable/c
procedure
(br v ...) → procedure?
v : outputable/c
procedure
(basefont v ...) → procedure?
v : outputable/c
procedure
(param v ...) → procedure?
v : outputable/c
procedure
(img v ...) → procedure?
v : outputable/c
procedure
(area v ...) → procedure?
v : outputable/c
procedure
(input v ...) → procedure?
v : outputable/c
procedure
(isindex v ...) → procedure?
v : outputable/c
procedure
(col v ...) → procedure?
v : outputable/c
procedure
(embed v ...) → procedure?
v : outputable/c
procedure
(keygen v ...) → procedure?
v : outputable/c
procedure
(wbr v ...) → procedure?
v : outputable/c
> (output-xml (hr)) <hr />
value
value
value
value
value
value
value
value
value
value
value
value
value
value
value
value
value
value
> (output-xml nbsp)
procedure
(script/inline v ...) → procedure?
v : outputable/c
> (output-xml (script/inline type: "text/javascript" "var x = 5;"))
<script type="text/javascript">
//<![CDATA[
var x = 5;
//]]>
</script>
procedure
(style/inline v ...) → procedure?
v : outputable/c
> (output-xml (style/inline type: "text/css" ".racket { font-size: xx-large; }"))
<style type="text/css">
.racket { font-size: xx-large; }
</style>
2.1.1 Other HTML elements
(require scribble/html/extra) | |
package: scribble-html-lib |
Provides renderers for HTML elements that are not provided by scribble/html/html.
procedure
(article v ...) → procedure?
v : outputable/c
procedure
(aside v ...) → procedure?
v : outputable/c
procedure
(audio v ...) → procedure?
v : outputable/c
procedure
(bdi v ...) → procedure?
v : outputable/c
procedure
(canvas v ...) → procedure?
v : outputable/c
procedure
(data v ...) → procedure?
v : outputable/c
procedure
(datalist v ...) → procedure?
v : outputable/c
procedure
(figcaption v ...) → procedure?
v : outputable/c
procedure
(figure v ...) → procedure?
v : outputable/c
procedure
(footer v ...) → procedure?
v : outputable/c
procedure
(header v ...) → procedure?
v : outputable/c
procedure
(main v ...) → procedure?
v : outputable/c
procedure
(map v ...) → procedure?
v : outputable/c
procedure
(mark v ...) → procedure?
v : outputable/c
procedure
(math v ...) → procedure?
v : outputable/c
procedure
(meter v ...) → procedure?
v : outputable/c
procedure
(nav v ...) → procedure?
v : outputable/c
procedure
(output v ...) → procedure?
v : outputable/c
procedure
(picture v ...) → procedure?
v : outputable/c
procedure
(progress v ...) → procedure?
v : outputable/c
procedure
(rb v ...) → procedure?
v : outputable/c
procedure
(rp v ...) → procedure?
v : outputable/c
procedure
(rt v ...) → procedure?
v : outputable/c
procedure
(rtc v ...) → procedure?
v : outputable/c
procedure
(ruby v ...) → procedure?
v : outputable/c
procedure
(section v ...) → procedure?
v : outputable/c
procedure
(summary v ...) → procedure?
v : outputable/c
procedure
(svg v ...) → procedure?
v : outputable/c
procedure
(template v ...) → procedure?
v : outputable/c
procedure
(time v ...) → procedure?
v : outputable/c
procedure
(video v ...) → procedure?
v : outputable/c
> (output-xml (title "The Book")) <title>The Book</title>
procedure
(source v ...) → procedure?
v : outputable/c
procedure
(track v ...) → procedure?
v : outputable/c
> (output-xml (hr)) <hr />