0
what is the difference between type="text" and type="name or email"?when we use only text and when we put the specific thing lik
6 odpowiedzi
- 4
Type = text means you can type in anything but type = email requires you to put a valid email before submitting a form. I think there is no type = name.
+ 4
type = "text" means you can type in anything in that input field before submitting but type = "email" requires you to put a valid email before submitting a form. I think there is no type = "name", i checked it on w3schools.
+ 4
Rakshit you just copied my answer :P
+ 3
There is no value `name or email` of the attribute `type` of the tag `input`. There is a `name` attribute of the tag `input` which is VERY important in when you are using a form `datalist` or input type select. The name attribute is also a Global Attribute, a set of attributes that are available in all tags. The difference between <input type="email"> (which is valid HTML) and <input type="text"> is that in the first input, you cannot type anything other than an email address. If you try to submit the form with an invalid email address, it will show you an error. You can, however, enter an email address with an unknown domain suffix. So, i.aswe@htmlformsexperts.com would be a perfectly valid email address. The same is true for <input type="url">, which will only accept a valid URL (Uniform Resource Locator).
+ 1
thank you guys
- 2
But this is the answer