html tutorial - name Attribute in HTML - html5 - html code - html form




Name attribute in html

Learn html - html tutorial - Name attribute in html - html examples - html programs

  • The name attribute defines the element name in HTML page.
  • Name attribute is used to refer the element in JavaScript.
  • For form elements the name attribute is used refer for the submission of data.
  • In iframe element it is used to target the form submission.
  • The name attribute is similarly used for map element, Meta element and param element.

Syntax for name attribute in HTML:

<element name= file content</element>

Sample Coding for name Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
         <body>
         Choose your favorite Technology:
         <button name="subject" type="submit" value="PHP">HTML
         </button> 
         <button name="subject" type="submit" value="Angular js">Angular js
         </button> 
         </body>
 </html>

Code Explanation for name Attribute in HTML:

 name  Attribute Code Explanation

  1. Here the name attribute given within the button tag used for the name of the button.

Output for name Attribute in HTML:

 name  Attribute Tag Output

  1. The name of the buttons are displayed in the output which is mentioned in the HTML document.

Browser Support for name Attribute in HTML:

Elements
Button Yes Yes Yes Yes Yes
fieldset Yes No Yes Yes Yes
form Yes Yes Yes Yes Yes
iframe Yes Yes Yes Yes Yes
input 1.0 2.0 1.0 1.0 1.0
keygen Yes No Yes 6.0 Yes
map Yes Yes Yes Yes Yes
meta Yes Yes Yes Yes Yes
object Yes Yes Yes Yes Yes
output 10.0 No 4.0 5.1 11.0
param Yes Yes Yes Yes Yes
select Yes Yes Yes Yes Yes
textarea Yes Yes Yes Yes Yes

Related Searches to name Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×