Open In App

HTML <input type="week">

Last Updated : 20 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

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 &lt;Input Type="week"&gt;</h2>

    <input type="week">
</body>

</html>

Output

HTML-Input-Type-Week

Supported Browsers

  • Google Chrome 20
  • Edge 12
  • Opera 11

Next Article

Similar Reads