• Blogs (9)
    • 📱 236 - 992 - 3846

      đź“§ jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • HTML5: input attributes

    Blogs20122012-02-08


    HTML5 Tag

    Attribute Value Description
    accept audio/*

    video/*
    image/*
    MIME\type_ | Specifies the types of files that the server accepts (only for type=“file”) | | alt | text | Specifies an alternate text for images (only for type=“image”) | | autocomplete | on
    off | Specifies whether an element should have autocomplete enabled | | autofocus | autofocus | Specifies that an element should automatically get focus when the page loads | | checked | checked | Specifies that an element should be pre-selected when the page loads (for type=“checkbox” or type=“radio”) | | disabled | disabled | Specifies that an element should be disabled | | form | form\id_ | Specifies one or more forms the element belongs to | | formaction | URL | Specifies the URL of the file that will process the input control when the form is submitted (for type=“submit” and type=“image”) | | formenctype | application/x-www-form-urlencoded
    multipart/form-data
    text/plain | Specifies how the form-data should be encoded when submitting it to the server (for type=“submit” and type=“image”) | | formmethod | get
    post | Defines the HTTP method for sending data to the action URL (for type=“submit” and type=“image”) | | formnovalidate | formnovalidate | Defines that form elements should not be validated when submitted | | formtarget | _blank
    _self
    _parent
    _top
    framename | Specifies where to display the response that is received after submitting the form (for type=“submit” and type=“image”) | | height | pixels | Specifies the height of an element (only for type=“image”) | | list | datalist\id_ | Refers to a element that contains pre-defined options for an element | | max | number
    date
    | Specifies the maximum value for an element | | maxlength | number | Specifies the maximum number of characters allowed in an element | | min | number
    date
    | Specifies a minimum value for an element | | multiple | multiple | Specifies that a user can enter more than one value in an element | | name | text | Specifies the name of an element | | pattern | regexp | Specifies a regular expression that an element’s value is checked against | | placeholder | text | Specifies a short hint that describes the expected value of an element | | readonly | readonly | Specifies that an input field is read-only | | required | required | Specifies that an input field must be filled out before submitting the form | | size | number | Specifies the width, in characters, of an element | | src | URL | Specifies the URL of the image to use as a submit button (only for type=“image”) | | step | number | Specifies the legal number intervals for an input field | | type | button
    checkbox
    color
    date
    datetime
    datetime-local
    email
    file
    hidden
    image
    month
    number
    password
    radio
    range
    reset
    search
    submit
    tel
    text
    time
    url
    week | Specifies the type element to display | | value | text | Specifies the value of an element | | width | pixels | Specifies the width of an element (only for type=“image”) |


    HTML5 Global Attributes

    Attribute Description
    accesskey Specifies a shortcut key to activate/focus an element
    class Specifies one or more classnames for an element (refers to a class in a style sheet)
    contenteditable Specifies whether the content of an element is editable or not
    contextmenu Specifies a context menu for an element. The context menu appears when a user right-clicks on the element
    dir Specifies the text direction for the content in an element
    draggable Specifies whether an element is draggable or not
    dropzone Specifies whether the dragged data is copied, moved, or linked, when dropped
    hidden Specifies that an element is not yet, or is no longer, relevant
    id Specifies a unique id for an element
    lang Specifies the language of the element’s content
    spellcheck Specifies whether the element is to have its spelling and grammar checked or not
    style Specifies an inline CSS style for an element
    tabindex Specifies the tabbing order of an element
    title Specifies extra information about an element