A2Zmenu.Com
Blog
Tutorials
Online Exam
Ask Question
Utility
Fun @ Work
Wiki
Contact Us
About Us
Loading
Home
Blogs
AJAX
ASP.NET
BI
CSharp
JavaScript
LINQ
Miscellaneous
MVC
SQL
SharePoint
Silverlight
WCF
Tutorials
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Online Exam
ASP.NET
LINQ
Silverlight
SQL
JavaScript
SharePoint
Forum
Utility
Fun @ Work
Appraisal
Funny Images
Funny Puzzle
Miscellaneous
Motivating Stories
Life Vs Work
Wiki
Contact Us
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Test Your Skill
Q. Which of the following input type was not introduced with HTML5.
URL
Search
multiple
Email
View all questions...
HTML5 Input Tag Overview
Input is an empty element, all it has is attributes. To make this input element more rich, HTML5 introduces lots of new attribute, of which some work globally and some are restricted to few input fields. All these new attributes added with HTML5 are optional and will be ignore if your browser does not recognize them.
Let's look at each of these new attibutes introduced with HTML5. HTML5 also comes with new values associated with type attribute. There is separate page dedicated to same. Let's take a look at other attibutes that come with HTML5 for inputtag.
Attributes
Values
Description
autocomplete
On/off
This will override the autocomplete attribute applied at the form level. If set to on form will remember the previous input value, if off browser will not store the input values.
autofocus
Autofocus
This will make the input field get focused on page load. Will not work for input type="hidden". Why will anyone want to set the focus on hidden field.
form
Name of form
With this attribute you can associate the input field to a form even if it is outside the form.
formaction
URL/URI
Overrides the action associated with the form, and specify its own form action.
formenctype
application/x-www-form-urlencoded
multipart/form-data
text/plain
Overrides the form's enctype attribute. Define the mime type to use to encode content of form.
formmethod
get/post
Overtype the form method associated with the form.
formnovalidate
True/false
Overrided the attribute value defined at the form level, If true input field will not be validated.
formtarget
_blank
_self
_parent
_top
framename
Override the attribute defined at the form level, depending upon the value, decides where to open.
height
[number][%|Pixels]
Defines the height of input field. Works only with input
type=image
list
Datalist-id
Specified the datalist containing predefined options for the input field.
max
Number/date
Maximum value associated with input field.
maxlength
Number
Maximum number of characters associated with an input field.
min
Number/date
Minimum value associated with input field, min and max can be used together to define a range.
multiple
Multiple
If present allow user to have more than one value. Very handy with input
type=file
pattern
Regular expression
This attribute can be used to define a particular pattern or format for a input field. i.e. "[a-f]" input value should be alphabet with range a to f.
placeholder
Text
Associate a watermark text with input field
required
Required
States if input field is a required field to submit a form.
step
Number
Set an interval for the input field, i.e if used with
type=number,
value will be incremented by the step value
width
[number][%|Pixels]
Used to set the width of input field, Used with type=image
<< Previous
Next >>
Comments
Bubbie
Posted on:
5/12/2011 5:29:44 AM
Great article... :)
Add Comment
Comment
Name
(Required)
E-mail
(Privacy assured)
(Required)
Subscribe to this site by email
Poll of the Day
Q.
Best Smart Mobile Phone in market?
I-Phone
Samsung
Nokia
Others
Related Contents
Online Test Papers
ASP.NET
JavaScript
LINQ
SharePoint
Silverlight
SQL
Related Tutorials
HTML 5 Tutorial
SharePoint Best Practice
How to add ribbon button in SharePoint list and library
List Join operation in SharePoint 2007 / 2010
ASP.NET 4.0 Tutorials
Fun @ Work
Keep smiling always
Developer Vs Tester
There are solutions, even to the hardest problems
Corporate Cartoons
Golden words of steve jobs
Top Blogs
SharePoint 2010 Modal Dialog
How to call webservice using Ajax or JavaScript
Microsoft OLE DB Provider for ODBC Drivers error 80004005
Using SQL SWITCH CASE Statement
Validation of viewstate MAC failed. If this application is hosted...
Creating a Windows Service in C#
Using InstallUtil to install/uninstall service
Each GROUP BY expression must contain at least one column that is not an outer reference
How to add ribbon button in SharePoint list and library
Client side onselectedindexchanged or onchange event in RadioButtonList
Arithmetic overflow error
Pass Data from Parent window to ChildWindow
Silverlight: ListBox with CheckBox
Tablix headers not repeating in SSRS 2008
LINQ to SQL Best Practice
Calling JavaScript function from C#
The contract name could not be found in the list of contracts implemented by the service
Like To Connect With US
x