Exampler.org SAS PYTHON HTML
HTML Home
HTML Table
HTML Form
HTML Button
HTML Checkbox
HTML Select
HTML Contact Form

HTML Forms;

What is it?

Syntax:

  • Form Tags: <Form> and </form>
  • Input Tags : <input type='The type of input field you want' >
  • Button Tag: <button> or <input type='button' value='Submit'>
  • Color Coding is for formatting only and does not reflect different languages


 Basic Form Example :




<form action='transmitmydata.html' method='post' >

     <input type='text' placeholder='Enter Phone Number Here' name='phone' >

     <input type='button' value='Submit'>

</form>






What's happening in the script above?

  • We've got a form with 1 text input, and 1 submit button
  • The form has two additional elements "action='transmitmydata.html" and "method='post'"
  • The action element is where the data is going to be sent when someone clicks the button
  • The method can either be Post or Get ("post" passes the information invisibly, "Get" passes the information visibly in the browser)
  • When a user clicks the button, the form has been instructed to send the data in the text box which we've named "phone" to transmitmydata.html
  • transmitmydata.html will need read that information and do something with it, like send an email, text message or store the information in a database.


Example Output:





See also; HTML Form

See also; HTML Buttons

See also; HTML Iframe




Connect via LinkedIn

Kevin Regan

Have an article, idea, found a typo, want to contribute? Shoot me an email Here