HTML form Tag name Attribute Tutorial

In this section, we will learn what the name attribute is and how to use it.

What is name Attribute in HTML <form> Tag?

The name attribute in HTML <form> element is used to set a name for the target form.

Later on, this name could be used in other languages like JavaScript and CSS to set a reference to the form and apply any necessary modifications.

Also, in servers, this name could be used to access the form and its data.

HTML name Attribute in <form> Tag Syntax:

<form name = “form-name”> </form>

<form> Tag name Attribute Values

The value we set for the name attribute could be any general or specific name.

But always try to use names that help you to remember what form you’re referencing.

Example: using name attribute in HTML <form> tag

See the Pen using name attribute in HTML <form> tag by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies