• 2641 views
  • 0 comments
  • loading...

Makes html tag

This helper is a little different. In addition to making the <html> tags, it prepends the tag with a doctype string[xhtml-w,xhtml-o,xhtml-school] .






>>> print HTML(BODY('<hello>', XML('<b>world</b>')))

<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html><body>&lt;hello&gt;<b>world</b></body></html>

Attributes / Arguments


HTML(..., lang='en', doctype='transitional')

Where doctype can be 'strict', 'transitional', 'frameset', 'html5', or a full doctype string.

HTML(..., lang='en', doctype='transitional')


loading...

Sources / Reference

" web2py Book Chapter 5: The views" is licensed under Creative Common License BY-NC-ND 3.0


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)