0
Forms
Whats the difference between the id=ââ and the type=ââ in the forms
2 Antworten
0
For example in html
<form>
<input id=ânameâ type=âtextâ></input>
<input type=âemailâ name=âemailâ></input>
<button type=âsubmitâ name=âsubmitâ></button>
</form>
When you run the code, if you donât write in the email section an email, the page will tell you when you submit âplease enter a valid email addressâ because the type was âemailâ
0
The id is just a way to identify it, you can write whatever you want
The âtypeâ is the type of thing it is, for example âtextareaâ or âemailâ