What is Name Attribute?
A set of attribute values plus an attribute identifier make up an attribute. The attribute identifier, often known as the attribute name, is a string that uniquely identifies a property. The content of an attribute is its value, and its type is not limited to that of a string. When you wish to define a specific attribute for retrieval, searches, or update, you use an attribute name. Operations that yield characteristics also return names (such as when you perform reads or searches in the directory).
You must be aware of specific directory server characteristics while using attribute names so that the result does not surprise you. These characteristics are discussed in the next section.
Uses of Name Attribute
- The
name
attribute specifies a name for an HTML element. - This
name
attribute can be used to reference the element in a JavaScript. - For a
<form>
element, thename
attribute is used as a reference when the data is submitted. - For an
<iframe>
element, thename
attribute can be used to target a form submission. - For a
<map>
element, thename
attribute is associated with the<img>
‘susemap
attribute and creates a relationship between the image and the map. - For a
<meta>
element, thename
attribute specifies a name for the information/value of thecontent
attribute. - For a
<param>
element, thename
attribute is used together with thevalue
attribute to specify parameters for the plugin specified with the<object>
tag.
Name Attribute Used with:-
Elements | Attribute |
---|---|
<button> | name |
<fieldset> | name |
<form> | name |
<iframe> | name |
<input> | name |
<map> | name |
<meta> | name |
<object> | name |
<output> | name |
<param> | name |
<select> | name |
<textarea> | name |