Register now or log in to join your professional community.
<head>
<style>
input:required {
background-color: yellow;
}
</style>
</head>
<body>
<p>An optional input element:<br><input></p>
<p>A required input element:<br><input required></p>
</body>