HTML <form> name Attribute

❮ HTML <form> tag


<form name="myForm" action="action.html" method="get">
	<label for="fname">First name:</label>
	<input type="text" id="fname" name="fname"><br>
	<label for="lname">Last name:</label>
	<input type="text" id="lname" name="lname"><br>
	<input type="submit" value="Submit">


name attribute specifies a name for the form and was traditionally used by JavaScript or other client-side programming technologies to reference forms and their contained elements.

Standard Syntax

<form name="text">

Browser Support


Attribute Values

Value Description
text Specifies the name of the form
❮ HTML <form> tag