HTML <label> Tag

Example Three radio buttons with labels: <form action=”/action_page.php”> <label for=”male”>Male</label> <input type=”radio” name=”gender” id=”male” value=”male”><br> <label for=”female”>Female</label> <input type=”radio” name=”gender” id=”female” value=”female”><br> <label for=”other”>Other</label> <input type=”radio” name=”gender” id=”other” value=”other”><br><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » Definition and Usage The <label> tag defines a label for an <input> element. The <label> element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if […]

HTML <figcaption> Tag

Example Use a <figure> element to mark up a photo in a document. The <figure> element can also contain a <figcaption>: <figure> <img src=”pic_trulli.jpg” alt=”Trulli” style=”width:100%”> <figcaption>Fig.1 – Trulli, Puglia, Italy.</figcaption> </figure> Try it Yourself » Definition and Usage The <figcaption> tag defines a caption for a <figure> element. The <figcaption> element can be placed as the first or last […]

HTML <fieldset> name Attribute

Example A <fieldset> with a name attribute: <fieldset name=”personalia”> Name: <input type=”text”><br> Email: <input type=”text”><br> </fieldset> Try it Yourself » Definition and Usage The name attribute specifies 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. Browser Support Attribute name Yes Not supported […]