HTML CSS examples for HTML Tag:fieldset
The name attribute sets a name for a fieldset.
The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.
Value | Description |
---|---|
name | Specifies the name of the fieldset |
A <fieldset> with a name attribute:
<!DOCTYPE html> <html> <body> <form action="/action_page.php" method="get"> <fieldset name="personalia"> Name: <input type="text" name="username"><br> Email: <input type="text" name="usermail"><br> </fieldset> <button type="button" onclick="form.personalia.style.backgroundColor='yellow'">Change background color of fieldset</button> <input type="submit"> </form><!--from ww w .j av a 2 s.c om--> </body> </html>