Horje
How to build HTML Input Type Url

The <input type="url"> is used for input fields that should contain a URL address.

Depending on browser support, the url field can be automatically validated when submitted.

Some smartphones recognize the url type, and adds ".com" to the keyboard to match url input.


How is to look HTML Input Type Url

index.html
Example: HTML
 <form>
  <label for="homepage">Add your homepage:</label>
  <input type="url" id="homepage" name="homepage">
</form> 

Output should be:

How is to look HTML Input Type Url

Full Code Example of HTML Input Type Url

Display a URL Input Field The input type="url" is used for input fields that should contain a URL address:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>Display a URL Input Field</h1>

<p>The <strong>input type="url"</strong> is used for input fields that should contain a URL address:</p>

<form action="/action_page.php">
  <label for="homepage">Add your homepage:</label>
  <input type="url" id="homepage" name="homepage">
  <input type="submit" value="Submit">
</form>

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Url





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://horje.com/learn/1434/reference