<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>URL</title>
</head>
<body>
<form>
Enter URL :
<input type="url">
<input type="submit" value="URL Validate">
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>email</title>
</head>
<body>
<form>
Email: <input type="email" title="Enter valid E-mail">
<input type="submit">
</form>
</body>
</html>
Email
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>URL</title>
</head>
<body>
<form>
Enter URL :
<input type="url">
<input type="submit" value="URL Validate">
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>email</title>
</head>
<body>
<form>
Email: <input type="email" title="Enter valid E-mail">
<input type="submit">
</form>
</body>
</html>
URL attribute
- This attribute is used only in input type="text" element and it will validate the value is url or not.
- It will automatically validate, if it is inside the form tag.
- This is mainly used for validate the email address. But It should write inside the <form> tag, then only it will validate automatically.
- If it is inside the <form> tag and pressed the submit button, it will validate and shown the error message.
HTML:-url&email tag
Reviewed by Network security
on
April 30, 2019
Rating:
No comments: