HTML Forms (text box and button) Tag

1/29/2020 6:58:57 AM

Html have form tag this tag are responsible to submit the form. This form tag under contain the many input and button tag etc. when we click the button then the form value posts the server this action performs the form tag.  On the other hand, form tag under text filed value post by the button click this work performs the form tag under action attribute. This input tag ‘type’ attribute is more importunate. We can write type as a text or type as a submit. If type as a ‘submit’ then it looks like button. And value field is showing the button name.  Now given bellow the from tag design code and explain the code:

<!DOCTYPE html>
      	<title>This is HTML</title>
<h2>My form</h2>
<form action="">
  <input type="text" name="name" placeholder="Enter your name">
  <input type="text" name="email" placeholder="Enter your email">
  <input type="submit" value="Save">

Now we can see the two-input text field and we use the placeholder to show under the text box some text and we use another input type as a submit. This input submit is button look like. And form tag contains action attribute but when we work with JavaScript then we work action attribute.