• Home
  • Tools
    • Color Chart
  • Software
    • Windows tricks
      • Windows 11 Speed Up Tricks
      • Windows Command Prompt CMD
    • Android Phone
      • Android – Dangerous Settings to Turn Off
    • Projects
      • Copy Files
      • Php Autoscript
      • Web Tools
  • Payments
  • Notes
  • System Tips

Notes

ACCESS 2022 | Browsers | Css | Htacess | Html | Html5 | Javascript | Microsoft Excel | Mysql | Mysql Dumps | Php | Vb.net | VBscript | Windows <=8 | Windows >=10 | WP | WP Plugin | WP Themes | _Misc Software |

ABCDEFGHIJKLMNOPQRSTUVWXYZ
ON
PRT
OFF

<- Look Inside Data
Conditions:
Order:
3 Language Operation Title
Keywords
Application
Code Languageid
Show Html
Show Iframe
Make Public
Viewed
Viewed Date
Html5 Form Form Attributes
required min max pattern
Html Forms
HTML5 New Form Attributes
HTML5 has several new attributes for
and
.
New attributes for
:
autocomplete
novalidate
New attributes for :

autocomplete
autofocus
form
formaction
formenctype
formmethod
formnovalidate
formtarget
height and width
list
min and max
multiple
pattern (regexp)
placeholder
required
step


/
autocomplete Attribute
The autocomplete attribute specifies whether a form or input field should have autocomplete on or off.
When autocomplete is on, the browser automatically complete values based on values that the user has entered before.
Tip:
It is possible to have autocomplete "on" for the form, and "off" for specific input fields, or vice versa.
Note:
The autocomplete attribute works with
and the following
types: text, search, url, tel, email, password, datepickers, range, and color.
Example
An HTML form with autocomplete on (and off for one input field):
First name:
Last name:
E-mail:

Try it yourself �
Tip:
In some browsers you may need to activate the autocomplete function for this to work.
novalidate Attribute
The novalidate attribute is a boolean attribute.
When present, it specifies that the form-data (input) should not be validated when submitted.
Example
Indicates that the form is not to be validated on submit:
E-mail:

Try it yourself �
autofocus Attribute
The autofocus attribute is a boolean attribute.
When present, it specifies that an
element should automatically get focus when the page loads.
Example
Let the "First name" input field automatically get focus when the page loads:
First name:
Try it yourself �
form Attribute
The form attribute specifies one or more forms an
element belongs to.
Tip:
To refer to more than one form, use a space-separated list of form ids.
Example
An input field located outside the HTML form (but still a part of the form):
First name:

Last name:
Try it yourself �
formaction Attribute
The formaction attribute specifies the URL of a file that will process the input control when the form is submitted.
The formaction attribute overrides the action attribute of the
element.
Note:
The formaction attribute is used with type="submit" and type="image".
Example
An HTML form with two submit buttons, with different actions:
First name:
Last name:
value="Submit as admin">

Try it yourself �
formenctype Attribute
The formenctype attribute specifies how the form-data should be encoded when submitting it to the server (only for forms with method="post")
The formenctype attribute overrides the enctype attribute of the
element.
Note:
The formenctype attribute is used with type="submit" and type="image".
Example
Send form-data that is default encoded (the first submit button), and encoded as "multipart/form-data" (the second submit button):
First name:
value="Submit as Multipart/form-data">

Try it yourself �
formmethod Attribute
The formmethod attribute defines the HTTP method for sending form-data to the action URL.
The formmethod attribute overrides the method attribute of the
element.
Note:
The formmethod attribute can be used with type="submit" and type="image".
Example
The second submit button overrides the HTTP method of the form:
First name:
Last name:
value="Submit using POST">

Try it yourself �
formnovalidate Attribute
The novalidate attribute is a boolean attribute.
When present, it specifies that the
element should not be validated when submitted.
The formnovalidate attribute overrides the novalidate attribute of the
element.
Note:
The formnovalidate attribute can be used with type="submit".
Example
A form with two submit buttons (with and without validation):
E-mail:

Try it yourself �
formtarget Attribute
The formtarget attribute specifies a name or a keyword that indicates where to display the response that is received after submitting the form.
The formtarget attribute overrides the target attribute of the
element.
Note:
The formtarget attribute can be used with type="submit" and type="image".
Example
A form with two submit buttons, with different target windows:
First name:
Last name:
value="Submit to a new window">

Try it yourself �
height and width Attributes
The height and width attributes specify the height and width of an
element.
Note:
The height and width attributes are only used with
.
Tip:
Always specify both the height and width attributes for images. If height and width are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the images load).
Example
Define an image as the submit button, with height and width attributes:

Try it yourself �
list Attribute
The list attribute refers to a
element that contains pre-defined options for an
element.
Example
An
element with pre-defined values in a
:


Try it yourself �
min and max Attributes
The min and max attributes specify the minimum and maximum value for an
element. The
TYPE MUST BE NUMBER NOT TEXT
Note:
The min and max attributes works with the following input types: number, range, date, datetime, datetime-local, month, time and week.
Example
elements with min and max values:
Enter a date before 1980-01-01:
Enter a date after 2000-01-01:
Quantity (between 1 and 5):
Try it yourself �
multiple Attribute
The multiple attribute is a boolean attribute.
When present, it specifies that the user is allowed to enter more than one value in the
element.
Note:
The multiple attribute works with the following input types: email, and file.
Example
A file upload field that accepts multiple values:
Select images:
Try it yourself �
pattern Attribute
The pattern attribute specifies a regular expression that the
element's value is checked against.
Note:
The pattern attribute works with the following input types: text, search, url, tel, email, and password.
Tip:
Use the global
title
attribute to describe the pattern to help the user.
Tip:
Learn more about
regular expressions
in our JavaScript tutorial.
Example
An input field that can contain only three letters (no numbers or special characters):
Country code:
Try it yourself �
placeholder Attribute
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format).
The short hint is displayed in the input field before the user enters a value.
Note:
The placeholder attribute works with the following input types: text, search, url, tel, email, and password.
Example
An input field with a placeholder text:

Try it yourself �
required Attribute
The required attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before submitting the form.
Note:
The required attribute works with the following input types: text, search, url, tel, email, password, date pickers, number, checkbox, radio, and file.
Example
A required input field:
Username:
Try it yourself �
step Attribute
The step attribute specifies the legal number intervals for an
element.
Example: if step="3", legal numbers could be -3, 0, 3, 6, etc.
Tip:
The step attribute can be used together with the max and min attributes to create a range of legal values.
Note:
The step attribute works with the following input types: number, range, date, datetime, datetime-local, month, time and week.
Example
An input field with a specified legal number intervals:

Try it yourself �
HTML5
Tag
Tag
Description
Defines an HTML form for user input
Defines an input control
Html5



1831
09/09/2023
Html5 Formatting New Html Types
color

Note: Not all major browsers support all the new input types. However, you can already start using them; If they are not supported, they will behave as regular text fields.


Input Type: color

The color type is used for input fields that should contain a color.

Opera Safari Chrome Firefox Internet Explorer

Example

Select a color from a color picker:

Select your favorite color:

Try it yourself »


Input Type: date

The date type allows the user to select a date.

Opera Safari Chrome Firefox Internet Explorer

Example

Define a date control:

Birthday:

Try it yourself »


Input Type: datetime

The datetime type allows the user to select a date and time (with time zone).

OperaSafariChromeFirefoxInternet Explorer

Example

Define a date and time control (with time zone):

Birthday (date and time):

Try it yourself »


Input Type: datetime-local

The datetime-local type allows the user to select a date and time (no time zone).

OperaSafariChromeFirefoxInternet Explorer

Example

Define a date and time control (no time zone):

Birthday (date and time):

Try it yourself »


Input Type: email

The email type is used for input fields that should contain an e-mail address.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a field for an e-mail address (will be automatically validated when submitted):

E-mail:

Try it yourself »

Tip: Safari on iPhone recognizes the email type, and changes the on-screen keyboard to match it (adds @ and .com options).


Input Type: month

The month type allows the user to select a month and year.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a month and year control (no time zone):

Birthday (month and year):

Try it yourself »


Input Type: number

The number type is used for input fields that should contain a numeric value.

You can also set restrictions on what numbers are accepted:

OperaSafariChromeFirefoxInternet Explorer

Example

Define a numeric field (with restrictions):

Quantity (between 1 and 5):

Try it yourself »

Use the following attributes to specify restrictions:

  • max - specifies the maximum value allowed
  • min - specifies the minimum value allowed
  • step - specifies the legal number intervals
  • value - Specifies the default value

Try an example with all the restriction attributes: Try it yourself


Input Type: range

The range type is used for input fields that should contain a value from a range of numbers.

You can also set restrictions on what numbers are accepted.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a control for entering a number whose exact value is not important (like a slider control):


Try it yourself »

Use the following attributes to specify restrictions:

  • max - specifies the maximum value allowed
  • min - specifies the minimum value allowed
  • step - specifies the legal number intervals
  • value - Specifies the default value

Input Type: search

The search type is used for search fields (a search field behaves like a regular text field).

OperaSafariChromeFirefoxInternet Explorer

Example

Define a search field (like a site search, or Google search):

Search Google:

Try it yourself »


Input Type: tel

OperaSafariChromeFirefoxInternet Explorer

Example

Define a field for entering a telephone number:

Telephone:

Try it yourself »


Input Type: time

The time type allows the user to select a time.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a control for entering a time (no time zone):

Select a time:

Try it yourself »


Input Type: url

The url type is used for input fields that should contain a URL address.

The value of the url field is automatically validated when the form is submitted.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a field for entering a URL:

Add your homepage:

Try it yourself »

Tip: Safari on iPhone recognizes the url input type, and changes the on-screen keyboard to match it (adds .com option).


Input Type: week

The week type allows the user to select a week and year.

OperaSafariChromeFirefoxInternet Explorer

Example

Define a week and year control (no time zone):

Select a week:

Try it yourself »
Html5



1208
09/09/2023
Html5 Language Html5
html5
Html5



4
09/27/2023

Software Web Design