HTML and CSS Reference
In-Depth Information
YYYY-MM-DDTHH:MM:SS.fffZ. Seconds and fractions thereof are optional. For example, 3:45 p.m. on December
12, 1982, would be sent as 1982-12-12T03:45Z or 1982-12-12T03:45:00.0000Z. Here the Z stands for
Greenwich Mean Time (a.k.a. Coordinated Universal Time, UTC, or Zulu time). The data can be provided in a
different time zone by using a plus sign (+) and an offset from Greenwich Mean Time. For example, Eastern
Standard Time is five hours earlier than Greenwich Mean Time, so the same time is 10:45 a.m. EST.
The user does not necessarily have to type in this format, but if they don't, the browser should convert to this
format before submitting the form to the server. The browser may offer a widget customized for collecting data
in this form and should verify that the data is reasonable before submitting it. If the user enters the time in a
local time zone, the browser should convert that to Greenwich Mean Time before submitting it.
datetime-local
The datetime-local type is the same as datetime , except there's no trailing Z . Furthermore, the time is
assumed to be given in the user's local time zone rather than in UTC. For example, 3:45 p.m. on December 12,
1982, would be sent as 1982-12-12T03:45 or 1982-12-12T03:45:00.0000.
month
The month type represents a specific month in a specific year, such as December 1952 or July 2028. Data is
submitted in the form YYYY-MM. For instance, December 1952 is 1952-12 and July 2028 is 2028-07. The user
can enter months in any form the browser accepts as long as the browser converts it to this form before
submission.
week
The week type represents a specific week in a specific year, such as the first week of 1952 or the thirty-second
week of 2009. Data is submitted in the form YYYY-Www. For instance, the first week of January 1952 is 1952-
W01. The thirty-second week of 2009 is 2009-W32. All weeks begin on a Monday. The first and fifty-second
weeks may extend across year boundaries.
number
The number type requests that the user enter a number. The default precision is 1, so by default the user can
only enter an integer. However, you can adjust this downward with the step attribute to allow the user to enter
a decimal number. For example, this input field requests a number between 1 and 12, including fractional
numbers such as 2.72 but not 2.71828:
<label>Pick a number between 1 and 12:
<input type="number" name="guess"
min='1' max='12' step='0.01'/>
</label>
range
A range control is similar to a numeric control. The crucial difference is that the exact value is not considered
important in the range, just that it's somewhere in the vicinity. An example would be a thermostat. You want
the temperature around 22° Celsius, but you don't really care whether it's 22.5 or 21.6, as long as it's in the
ballpark. For example:
<label>Temperature:
<input type="range" name="temp"
min='-20' max='90' step='0.5'/>
</label>
Search WWH ::




Custom Search