Tutorials References Menu

HTML <input type="week">

❮ HTML <input> type attribute

Example

Define a week and year control (no time zone):

<label for="week">Select a week:</label>
<input type="week" id="week" name="week">
Try it Yourself »

Definition and Usage

The <input type="week"> defines a week and year control (no time zone).

Tip: Always add the <label> tag for best accessibility practices!


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Attribute
type="week" 25.0 12.0 Not supported Not supported 10.1

Syntax

<input type="week">

❮ HTML <input> type attribute