HTML Attributes

HTML type attribute

Build a form with the HTML form generator

Selects an element-specific kind: input control state, button behavior, ordered-list numbering, script interpretation or resource media type. Consult the element's own allowed values. Applicable elements include: <a>, <button>, <embed>, <input>, <link>, <object>, <ol>, <script>, <source>. Check each element’s value rules.

Formal Syntax & Structure

html syntaxhtml
type="button"

Parameters & Attributes

NameTypeDescription
typeelement-dependent keyword or MIME typeSelects an element-specific kind: input control state, button behavior, ordered-list numbering, script interpretation or resource media type. Consult the element's own allowed values.

Working Example

Example Snippethtml
<button type="button">Preview</button>
HTML Reference