Last Updated : 20 May, 2024
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">.
HTML
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input Type week
</title>
</head>
<body style="text-align:center;">
<h1 style="color:green;">
GeeksforGeeks
</h1>
<h2>HTML <Input Type="week"></h2>
<input type="week">
</body>
</html>
Output
Supported BrowsersRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4