HTML 5

From HaFrWiki
Revision as of 09:44, 25 February 2019 by Hjmf (talk | contribs) (Created page with "{{TOCright}} == Introduction == A collection of HTML 5 tips and Tricks. == Chrome input == As you may already know, HTML5 has introduced a number of new input types, one of...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

A collection of HTML 5 tips and Tricks.

Chrome input

As you may already know, HTML5 has introduced a number of new input types, one of which is the “number” type. As you might expect, this is a form field which accepts numeric input. So what happens in Chrome with the following HTML when we try to enter a decimal (floating point) number and submit the form?

<input type="number" />

Answer: Chrome pops up a validation error:

Invalid value

Better use:

<input type="number" step="any" />

See also

top

Reference

top