HTML <input type=”week”>
The HTML <input type=”week”> is used to select a specific week of the year using a week picker interface. It provides an easy way to input week-based data, including the year and week number, in a standardized format, enhancing user experience and data consistency.
Syntax
<input type="week">
Example: In this example, we will explain the use of HTML <input type=”week”>.
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input Type week
</title>
</head>
<body style="text-align:center;">
<h1 style="color:green;">
w3wiki
</h1>
<h2>HTML <Input Type="week"></h2>
<input type="week">
</body>
</html>
Output
Supported Browsers
- Google Chrome 20
- Edge 12
- Opera 11