How to use the html.html_tag function in html

To help you get started, we’ve selected a few html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Knio / dominate / pyy / html5.py View on Github external
class i(html_tag): valid = COMMON
class b(html_tag): valid = COMMON
class bdo(html_tag): valid = COMMON
class ruby(html_tag): valid = COMMON
class rt(html_tag): valid = COMMON
class rp(html_tag): valid = COMMON

#Edits
class ins(html_tag):
    valid = COMMON + ['cite', 'datetime']
class del_(html_tag):
    valid = COMMON + ['cite', 'datetime']

#Embedded content
class figure(html_tag): valid = COMMON
class img(html_tag):
    valid    = COMMON + ['alt', 'src', 'usemap', 'ismap', 'width', 'height']
    required = ['src']
class iframe(html_tag):
    valid = COMMON + ['src', 'name', 'sandbox', 'seamless', 'width', 'height']
class embed(html_tag):
    valid = COMMON + ['src', 'type', 'width', 'height']
class object_(html_tag):
    valid = COMMON + ['data', 'type', 'name', 'usemap', 'form', 'width', 'height']
class param(html_tag):
    valid = COMMON + ['name', 'value']
class video(html_tag):
    valid = COMMON + ['src', 'poster', 'autobuffer', 'autoplay', 'loop', 'controls', 'width', 'height']
class audio(html_tag):
    valid = COMMON + ['src', 'autobuffer', 'autoplay', 'loop', 'controls']
class source(html_tag):
    valid = COMMON + ['src', 'type', 'media']
github Knio / dominate / pyy / html5.py View on Github external
class a(html_tag):
    valid = COMMON + ['href', 'target', 'ping', 'rel', 'media', 'hreflang', 'type']
class q(html_tag):
    valid = COMMON + ['cite']
class cite(html_tag): valid = COMMON
class em(html_tag): valid = COMMON
class strong(html_tag): valid = COMMON
class small(html_tag): valid = COMMON
class mark(html_tag): valid = COMMON
class dfn(html_tag): valid = COMMON
class abbr(html_tag): valid = COMMON
class time(html_tag):
    valid = COMMON + ['datetime']
class progress(html_tag):
    valid = COMMON + ['value', 'max']
class meter(html_tag):
    valid = COMMON + ['value', 'min', 'low', 'high', 'max', 'optimum']
class code(html_tag): valid = COMMON
class var(html_tag): valid = COMMON
class samp(html_tag): valid = COMMON
class kbd(html_tag): valid = COMMON
class sub(html_tag): valid = COMMON
class sup(html_tag): valid = COMMON
class span(html_tag): valid = COMMON
class i(html_tag): valid = COMMON
class b(html_tag): valid = COMMON
class bdo(html_tag): valid = COMMON
class ruby(html_tag): valid = COMMON
class rt(html_tag): valid = COMMON
class rp(html_tag): valid = COMMON

#Edits
github Knio / dominate / pyy / html4strict.py View on Github external
valid    = ['shape', 'coords', 'href', 'nohref', 'alt', 'tabindex', 'accesskey', 'onfocus', 'onblur'] + COMMON
    required = ['alt']
    default  = {'alt': ''}

class style(html_tag):
    valid    = ['type', 'media', 'title'] + COMMON
    required = ['type']

class tt(html_tag): valid = COMMON
class i(html_tag): valid = COMMON
class b(html_tag): valid = COMMON
class big(html_tag): valid = COMMON
class small(html_tag): valid = COMMON
class strike(html_tag): valid = COMMON
class s(html_tag): valid = COMMON
class u(html_tag): valid = COMMON
class hr(single): valid = COMMON

class form(html_tag):
    valid    = ['action', 'method', 'enctype', 'accept', 'name', 'onsubmit', 'onreset', 'accept-charset'] + COMMON
    required = ['action']
class input_(single): valid = ['type', 'name', 'value', 'checked', 'disabled', 'readonly', 'size', 'maxlength', 'src', 'alt', 'usemap', 'ismap', 'tabindex', 'accesskey', 'onfocus', 'onblur', 'onselect', 'onchange', 'accept'] + COMMON
class button(single): valid = ['name', 'value', 'type', 'disabled', 'tabindex', 'accesskey', 'onfocus', 'onblur'] + COMMON
class select(html_tag): valid = ['name', 'size', 'multiple', 'disabled', 'tabindex', 'onfocus', 'onblur', 'onchange'] + COMMON
class optgroup(html_tag): valid = ['disabled', 'label'] + COMMON
class option(single): valid = ['selected', 'disabled', 'label', 'value'] + COMMON
class textarea(html_tag):
    valid    = ['name', 'rows', 'cols', 'disabled', 'readonly', 'tabindex', 'accesskey', 'onfocus', 'onblur', 'onselect', 'onchange'] + COMMON
    required = ['rows', 'cols']
class label(html_tag): valid = ['for', 'accesskey', 'onfocus', 'onblur'] + COMMON
class fieldset(html_tag): valid = COMMON
class legend(html_tag): valid = ['accesskey'] + COMMON
github Knio / dominate / pyy / html5.py View on Github external
class section(html_tag):
    valid = COMMON + ['cite']
class nav(html_tag): valid = COMMON
class article(html_tag):
    valid = COMMON + ['cite', 'pubdate']
class aside(html_tag): valid = COMMON
class h1(html_tag): valid = COMMON
class h2(html_tag): valid = COMMON
class h3(html_tag): valid = COMMON
class h4(html_tag): valid = COMMON
class h5(html_tag): valid = COMMON
class h6(html_tag): valid = COMMON
class hgroup(html_tag): valid = COMMON
class header(html_tag): valid = COMMON
class footer(html_tag): valid = COMMON
class address(html_tag): valid = COMMON

#Grouping content
class p(html_tag): valid = COMMON
class hr(single): valid = COMMON
class br(single): valid = COMMON
class pre(ugly): valid = COMMON
class dialog(html_tag): valid = COMMON
class blockquote(html_tag):
    valid = COMMON + ['cite']
class ol(html_tag):
    valid = COMMON + ['reversed', 'start']
class ul(html_tag): valid = COMMON
class li(html_tag): valid = COMMON
class dl(html_tag): valid = COMMON
class dt(html_tag): valid = COMMON
class dd(html_tag): valid = COMMON
github Knio / dominate / pyy / html4strict.py View on Github external
required = ['name']
class map_(html_tag):
    valid    = ['name'] + COMMON
    required = ['name']
class area(single):
    valid    = ['shape', 'coords', 'href', 'nohref', 'alt', 'tabindex', 'accesskey', 'onfocus', 'onblur'] + COMMON
    required = ['alt']
    default  = {'alt': ''}

class style(html_tag):
    valid    = ['type', 'media', 'title'] + COMMON
    required = ['type']

class tt(html_tag): valid = COMMON
class i(html_tag): valid = COMMON
class b(html_tag): valid = COMMON
class big(html_tag): valid = COMMON
class small(html_tag): valid = COMMON
class strike(html_tag): valid = COMMON
class s(html_tag): valid = COMMON
class u(html_tag): valid = COMMON
class hr(single): valid = COMMON

class form(html_tag):
    valid    = ['action', 'method', 'enctype', 'accept', 'name', 'onsubmit', 'onreset', 'accept-charset'] + COMMON
    required = ['action']
class input_(single): valid = ['type', 'name', 'value', 'checked', 'disabled', 'readonly', 'size', 'maxlength', 'src', 'alt', 'usemap', 'ismap', 'tabindex', 'accesskey', 'onfocus', 'onblur', 'onselect', 'onchange', 'accept'] + COMMON
class button(single): valid = ['name', 'value', 'type', 'disabled', 'tabindex', 'accesskey', 'onfocus', 'onblur'] + COMMON
class select(html_tag): valid = ['name', 'size', 'multiple', 'disabled', 'tabindex', 'onfocus', 'onblur', 'onchange'] + COMMON
class optgroup(html_tag): valid = ['disabled', 'label'] + COMMON
class option(single): valid = ['selected', 'disabled', 'label', 'value'] + COMMON
class textarea(html_tag):
github Knio / dominate / pyy_html / xhtml11.py View on Github external
class h6        (html_tag): valid = COMMON
class hr        (single):   valid = COMMON
class ins       (html_tag): valid = ['cite', 'datetime'] + COMMON
class noscript  (html_tag): valid = COMMON
class ol        (html_tag): valid = COMMON
class p         (html_tag): valid = COMMON
class pre       (ugly):     valid = ['xml:space'] + COMMON
class table     (html_tag): valid = ['border', 'cellpadding', 'cellspacing', 'summary', 'width', 'frame', 'rules'] + COMMON
class ul        (html_tag): valid = COMMON

#Inline elements
class a       (html_tag): valid = ['href', 'accesskey', 'charset', 'coords', 'hreflang', 'onblur', 'onfocus', 'rel', 'rev', 'shape', 'tabindex', 'type'] + COMMON
class abbr    (html_tag): valid = COMMON
class acronym (html_tag): valid = COMMON
class b       (html_tag): valid = COMMON
class bdo     (html_tag): valid = ['dir'] + COMMON
class big     (html_tag): valid = COMMON
class br      (single):   valid = COMMON
class button  (html_tag): valid = ['name', 'type', 'value', 'accesskey', 'disabled', 'onblur', 'onfocus', 'tabindex'] + COMMON
class cite    (html_tag): valid = COMMON
class code    (ugly):     valid = COMMON
class dfn     (html_tag): valid = COMMON
class em      (html_tag): valid = COMMON
class i       (html_tag): valid = COMMON
class img     (single):
    valid    = ['alt', 'height', 'src', 'width', 'ismap', 'longdesc', 'usemap'] + COMMON
    required = ['alt', 'src']
    default  = {'alt': ''}
class _input  (single):   valid = ['alt', 'checked', 'maxlength', 'name', 'size', 'type', 'value', 'accept', 'accesskey', 'disabled', 'ismap', 'onblur', 'onchange', 'onfocus', 'onselect', 'readonly', 'src', 'tabindex', 'usemap'] + COMMON
class kbd     (html_tag): valid = COMMON
class label   (html_tag): valid = ['for', 'accesskey', 'onblur', 'onfocus'] + COMMON
class _map    (html_tag): valid = COMMON
github Knio / dominate / pyy / html4strict.py View on Github external
class head(html_tag): valid = ['profile'] + COMMON_I18N
class title(html_tag): valid = COMMON_I18N
class meta(single):
    valid    = ['http-equiv', 'name', 'content', 'scheme'] + COMMON_I18N
    required = ['content']
class body(html_tag): valid = ['onload', 'onunload'] + COMMON

class bdo(html_tag):
    valid    = ['lang', 'dir'] + COMMON_CORE
    required = ['dir']

class div(html_tag): valid = COMMON
class span(html_tag): valid = COMMON

class h1(html_tag): valid = COMMON
class h2(html_tag): valid = COMMON
class h3(html_tag): valid = COMMON
class h4(html_tag): valid = COMMON
class h5(html_tag): valid = COMMON
class h6(html_tag): valid = COMMON

class address(html_tag): valid = COMMON

class em(html_tag): valid = COMMON
class strong(html_tag): valid = COMMON
class dfn(html_tag): valid = COMMON
class code(html_tag): valid = COMMON
class samp(html_tag): valid = COMMON
class kbd(html_tag): valid = COMMON
class var(html_tag): valid = COMMON
class cite(html_tag): valid = COMMON
class abbr(html_tag): valid = COMMON
github Knio / dominate / pyy / html5.py View on Github external
class form(html_tag):
    valid = COMMON + ['accept-charset', 'action', 'autocomplete', 'enctype', 'method', 'name', 'novalidate', 'target']
class fieldset(html_tag):
    valid = COMMON + ['disabled', 'form', 'name']
class label(html_tag):
    valid = COMMON + ['form', 'for']
class input_(single):
    valid = COMMON + ['accept', 'alt', 'autocomplete', 'autofocus', 'checked', 'disabled', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'list', 'max', 'maxlength', 'min', 'multiple', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'src', 'step', 'type', 'value', 'width']
class button(html_tag):
    valid = COMMON + ['autofocus', 'disabled', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'name', 'type', 'value']
class select(html_tag):
    valid = COMMON + ['autofocus', 'disabled', 'form', 'multiple', 'name', 'size']
class datalist(html_tag): valid = COMMON
class optgroup(html_tag):
    valid = COMMON + ['disabled', 'label']
class option(html_tag):
    valid = COMMON + ['disabled', 'label', 'selected', 'value']
class textarea(html_tag):
    valid = COMMON + ['autofocus', 'cols', 'disabled', 'form', 'maxlength', 'name', 'placeholder', 'readonly', 'required', 'rows', 'wrap']
class keygen(html_tag):
    valid = COMMON + ['autofocus', 'challenge', 'disabled', 'form', 'keytype', 'name']
class output(html_tag):
    valid = COMMON + ['for', 'form', 'name']

#Interactive elements
class details(html_tag):
    valid = COMMON + ['open']
class datagrid(html_tag):
    valid = COMMON + ['disabled']
class command(html_tag):
    valid = COMMON + ['type', 'label', 'icon', 'disabled', 'checked', 'radiogroup']
class bb(html_tag):
github Knio / dominate / pyy / xhtml11.py View on Github external
#Map areas
class area(single):
    valid    = ['alt', 'coords', 'href', 'shape', 'accesskey', 'onblur', 'onfocus', 'nohref', 'tabindex'] + COMMON
    required = ['alt']
    default  = {'alt': ''}

#Object parameters
class param(single):
    valid    = ['name', 'value', 'id', 'type', 'valuetype']
    required = ['name']

#Ruby annotations
class rb (html_tag): valid = COMMON
class rbc(html_tag): valid = COMMON
class rp (html_tag): valid = COMMON
class rt (html_tag): valid = ['rbspan'] + COMMON
class rtc(html_tag): valid = COMMON

###############################################################################

class htmlpage(response):
    def __init__(self, title='XHTML 1.1 Page', request=None):
        response.__init__(self, title, request)
        
        self.headers['Content-Type'] = 'application/xhtml+xml'
        self.doctype = ''
        self.html    = html()
        self.html.head, self.html.body = self.html.add(head(), body())
    
    def render(self, just_html=False):
        if not just_html and self.request.browser == BROWSER_IE:
            self.headers['Content-Type'] = 'text/html'
github Knio / dominate / pyy_html / xhtml11.py View on Github external
class noscript  (html_tag): valid = COMMON
class ol        (html_tag): valid = COMMON
class p         (html_tag): valid = COMMON
class pre       (ugly):     valid = ['xml:space'] + COMMON
class table     (html_tag): valid = ['border', 'cellpadding', 'cellspacing', 'summary', 'width', 'frame', 'rules'] + COMMON
class ul        (html_tag): valid = COMMON

#Inline elements
class a       (html_tag): valid = ['href', 'accesskey', 'charset', 'coords', 'hreflang', 'onblur', 'onfocus', 'rel', 'rev', 'shape', 'tabindex', 'type'] + COMMON
class abbr    (html_tag): valid = COMMON
class acronym (html_tag): valid = COMMON
class b       (html_tag): valid = COMMON
class bdo     (html_tag): valid = ['dir'] + COMMON
class big     (html_tag): valid = COMMON
class br      (single):   valid = COMMON
class button  (html_tag): valid = ['name', 'type', 'value', 'accesskey', 'disabled', 'onblur', 'onfocus', 'tabindex'] + COMMON
class cite    (html_tag): valid = COMMON
class code    (ugly):     valid = COMMON
class dfn     (html_tag): valid = COMMON
class em      (html_tag): valid = COMMON
class i       (html_tag): valid = COMMON
class img     (single):
    valid    = ['alt', 'height', 'src', 'width', 'ismap', 'longdesc', 'usemap'] + COMMON
    required = ['alt', 'src']
    default  = {'alt': ''}
class _input  (single):   valid = ['alt', 'checked', 'maxlength', 'name', 'size', 'type', 'value', 'accept', 'accesskey', 'disabled', 'ismap', 'onblur', 'onchange', 'onfocus', 'onselect', 'readonly', 'src', 'tabindex', 'usemap'] + COMMON
class kbd     (html_tag): valid = COMMON
class label   (html_tag): valid = ['for', 'accesskey', 'onblur', 'onfocus'] + COMMON
class _map    (html_tag): valid = COMMON
class _object (html_tag): valid = ['classid', 'codebase', 'height', 'name', 'type', 'width', 'archive', 'codetype', 'data', 'declare', 'standby', 'tabindex', 'usemap'] + COMMON
class q       (html_tag): valid = ['cite'] + COMMON
class ruby    (html_tag): valid = COMMON