The required attribute

Tutorials of (The required attribute) by Tom

<!DOCTYPE html>
<html lang="en" >
  <meta charset="UTF-8">
  <title>The required attribute</title>
      <link rel="stylesheet" href="css/style.css">


  <!-- Learn about this code on MDN: -->

  <label for="choose">Are you a fan of the Badgers or the Gophers?</label>
  <input id="choose" name="i_like" pattern="Badgers|Gophers|Tommies" required>
/* Downloaded from */
input:invalid {
  border: 1px solid red;

input:valid {
  border: 1px solid green;

"Tommies" {
	border: 1px solid purple;
/* Downloaded from */

This awesome code ( The required attribute ) is write by Tom, you can se more from this user in the personal repository

You can find the original code on

2018 © Tom