HTML <button> name Attribute

Example Two buttons with equal names, that submit different values when clicked: <form action=”/action_page.php” method=”get”> Choose your favorite subject: <button name=”subject” type=”submit” value=”HTML”>HTML</button> <button name=”subject” type=”submit” value=”CSS”>CSS</button> </form> Try it Yourself » Definition and Usage The name attribute specifies the name for a <button> element. The name attribute is used to reference form-data after the form has been submitted, or to reference the […]

HTML <a> name Attribute

Example The name attribute specifies the name of an anchor: <a name=”C4″>Chapter 4</a> Try it Yourself » Definition and Usage The <a> name attribute is not supported in HTML5. Use the id attribute instead. The name attribute specifies the name of an anchor. The name attribute is used to create a bookmark inside a document. Syntax <a name=”value”> […]