Attributo del nome <iframe> HTML

❮ Tag HTML <iframe>

Esempio

Un <iframe> che funge da destinazione per un collegamento:

<iframe src="demo_iframe.htm" name="iframe_a"></iframe>

<a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a>

Definizione e utilizzo

L' nameattributo specifica un nome per un iframe.

Questo nameattributo può essere utilizzato per fare riferimento all'elemento in un JavaScript, o come valore targetdell'attributo di un elemento <a>o <form>, o come formtargetattributo di un elemento <input>o <button>.


Supporto browser

Attribute
name Yes Yes Yes Yes Yes

Sintassi

<iframe name="name">

Valori di attributo

Value Description
name Specifies a name for the <iframe>

❮ Tag HTML <iframe>