<!DOCTYPE html>
<!-- form with invalid and valid elements -->
<html>
  <head>
    <style>
      form:invalid { display: none; }
    </style>
  </head>
  <body>
    <form>
      <input id='i' value='foo'>
      <input required>
    <form>
  <body>
<html>