The HTML Elements reference.

"legend" - html element

  • This element is used to provide the caption text for grouped form controls and text contained in a fieldset.
  • Starttag <legend> is Required and endtag </legend> is Required
  • Browsers that support the legend - element : Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari
Element "legend" example:
    <form action="tryexamples/getFerrari.php"
         title="get a Car">
        <legend>Buy a Car:</legend>
        Type : <input type="text" name="car" value="Ferrari" /><br />
        Model: <input type="text" name="model" value="2010"/><br />
        Price : <input type="text" name="price" value="$100000"/>
      <button type="submit" >Get the car</button>
      <button type="reset" >Reset form</button>

accesskey , align (deprecated), class , dir , id , lang , style , title

Attribute "accesskey" value(s): a character as the accesskey
  • Assigns an access key to an element. Pressing an access key assigned to an element gives focus to the element. Will set focus in the legend element.
  • The action that occurs when an element receives focus depends on the element.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.