You are here : htmlHTML 5legend

<legend> - HTML 5

The <legend> tag defines a caption for the <fieldset> element.


Syntax

    <form>	 	<fieldset>	   	<legend>Personalia:</legend>	   	Name: <input type="text" size="30"><br>	   	Email: <input type="text" size="30"><br>	   	Date of birth: <input type="text" size="10">	 	</fieldset>	</form>


Example

    <form>	 	<fieldset>	   	<legend>Personalia:</legend>	   	Name: <input type="text" size="30"><br>	   	Email: <input type="text" size="30"><br>	   	Date of birth: <input type="text" size="10">	 	</fieldset>	</form>


Output / Return Value


Limitations


Alternatives / See Also


Reference