labels in html

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


<!DOCTYPE html>
<html>
<body>

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

</body>

</html>

Output:

Personalia:Name: 
Email: 
Date of birth: 

Comments

Popular posts from this blog

Headings In HTML

Introduction and Format of HTML

Font Tag