<!DOCTYPE HTML>
<html>
<head>
<style>
fieldset { 
  background:pink;
  overflow:hidden;
  height:100px;
}
legend::after { content:"legend"; }
p {
  background:lime;
  height:20px;
}
</style>
</head>
<body>
<fieldset id="f1"><legend></legend><p></p></fieldset>
<br>
<fieldset id="f2"><legend></legend><p></p></fieldset>
<br>
<fieldset id="f3"><legend></legend></fieldset>
</body>
</html>