programming-examples/html/Basics/Creating HTML5 url input type.html

22 lines
544 B
HTML
Raw Permalink Normal View History

2019-11-18 14:44:36 +01:00
<!DOCTYPE html>
<html subLang="en">
<head>
<title>HTML5 URL Input Type</title>
<style type="text/css">
input[type="url"]:valid{
outline: 2px solid green;
}
input[type="url"]:invalid{
outline: 2px solid red;
}
</style>
</head>
<body>
<form>
<label>
Website URL: <input type="url" name="mywebsite" required>
</label>
</form>
<p><strong>Note</strong>: Enter URL in the form like http://www.google.com</p>
</body>
</html>