Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<form>
  <fieldset id="myFieldset">
  <legend>Personalia:</legend>
  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text">
  </fieldset>
</form>
<p>Click the button to display which type of form element the fieldset is.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  var x = document.getElementById("myFieldset").type;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>