Required Form Field Input Attribute Tutorial
Learn to apply the "required" attribute to your HTML web form fields. It pops up a tip right next to the target field that lets the user know that they are required to fill in that form field before they can proceed.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>HTML5 Form Required Fields</h2>
<form>
User Name: <input type="text" name="uname" id="uname" required >
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>