HTML Forms

Example

<!DOCTYPE html>
<html>
<body>

<h2>HTML Forms</h2>

<form action=”/action_page.php”>
name:<br>
<input type=”text” name=”name” value=”Mickey”>
<br>
city name:<br>
<input type=”text” name=”city” value=”surat”>
<br><br>
<input type=”submit” value=”Submit”>
</form>

<p>If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.</p>

</body>
</html>

Output

HTML Forms

name:

city name:


If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.

Example

<!DOCTYPE html>
<html>
<body>

<h2>HTML Forms</h2>

<form action=”/action_page.php”>
First name:<br>
<input type=”text” name=”firstname” value=”Mickey”>
<br>
Last name:<br>
<input type=”text” name=”lastname” value=”Mouse”>
<br><br>
<input type=”submit” value=”Submit”>
</form>

<p>If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.</p>

</body>
</html>

Output

HTML Forms

First name:

Last name:


If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.

Updated: February 12, 2019 — 6:52 am
Java Script © 2019