...

Web Technologies - HTML5

Back to Course

Lesson Description


Lession - #548 HTML5 Web forms


A web form (or html form>
could be a place where users enter data or personal data that is then sent to a server for processing. as an example, users will provide their name and email address to register for a newsletter or place an order.

HTML5 forms built-in validation takes semantic markup to the next level. It provides the convenience of writing scripts and styles that were a tedious task in earlier versions of html. you'll be able to still take advantage of HTML5 forms even if Javascript is disabled in the browser.

1 A date and time (year, month, day, hour, minute, second, fractions of a second>
encoded according to ISO 8601 with the time zone set to Greenwich Mean Time.

2 datetime-local
A date and time (year, month, day, hour, minute, second, fractions of a second>
encoded according to ISO 8601, with no time zone info.

3 date
A date (year, month, day>
encoded according to ISO 8601.

4 month
A date consisting of a year and a month encoded according to ISO 8601.

5 week
A date consisting of a year and per week number encoded according to ISO 8601.

time
A time (hour, minute, seconds, fractional seconds>
encoded according to ISO 8601.

7 number
It accepts only numerical worth. The step attribute specifies the precision, defaulting to one.

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

9 email
It accepts only email value. this type is used for input fields that should contain an e-mail address. If you try to submit a simple text, it forces to enter only email address in email@example.com format.

10 url
It accepts solely url value. this type is used for input fields that should contain a url address. If you try to submit a simple text, it forces to enter only url address either in http://www.example.com format or in http://example.com format.

The <output< element

HTML5 introduced a brand new element that is used to represent the result of different types of output, like output written by a script.

You can use the for attribute to specify a relationship between the output component and other elements within the document that affected the calculation (for example, as inputs or parameters>
. the value of the for attribute may be a space-separated list of IDs of other elements.