0
Forms
Whats the difference between the id=“” and the type=“” in the forms
2 odpowiedzi
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”