Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator

HTML <input> Tag

HTML <input> tag define a get information in selected input.

<input> tag use to get user information, registation details etc.


<form action="form_tag_get.php" method="post">
Username: <input type="text" /><br />
Password: <input type="password" /><br />
<input type="submit" value="Submit" />
Online Try This Code Your Self....   »



<input> Tag

The most used form tag is the <input> tag. This is the most commonly used tag within HTML forms. It give you to specify various types of user information fields such as text, checkboxes, radio buttons, Select Lists, Submit etc.

Attributes Value Description
type "text"
use input text value.
use to input button
use to text is convert password type.
use to browse file.
use to select option checkbox.
use to select in radio type.
use to input reset data.
use to input submit data.
value "Value" Specify the default value of element.
name "Value" Specify unique name for the input element.
size "Number" define width of numbered(character) size input box.
maxlength "Number" define maximun number(characer) allow to enter input box.
checked   Specify input element to be checked when it is first time loaded.
alt "Text" define input name to identify.
align "left"
define input type align in HTML document.
src "URL" define image open to mouse down submit.

Dynamic Attributes

<input> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<input> tag supported following Event attributes.:

Attributes Value Description
onfocus "Java_script" element gets focus on object when script tobe run.
onblur "Java_script" element lose the focus on object when scrip tobe run.
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.