- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use URL input type in HTML?
The URL input type is used in HTML using the <input type="url">. Using this, allow users to add URL input type. On some browsers, the URL entered will be validated i.e. if you miss .com, while adding URL, then it won’t submit the form and will show an error i.e. “Please enter a URL”.
Example
You can try to run the following code to learn how to use URL input type in HTML −
<!DOCTYPE html> <html> <head> <title>HTML input URL</title> </head> <body> <form action = "" method = "get"> Details:<br><br> Student Name<br><input type="name" name="sname"><br> Student Website<br> <input type="url" name="website"><br> <input type="submit" value="Submit"> </form> </body> </html>
Advertisements