<form>
	<label>
    Nome
    <input name="name" required
  </label>

	<label>
    Email
    <input name="email" type="email" required>
  </label>
    
  <button>Enviar</button>
</form>
form:invalid button {
  opacity: 0.5;
}

input:invalid {
  border: 2px solid red;
}

input:valid {
  border: 2px solid gren;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.