Open In App

HTML | <input type=”week”>

The HTML <input type=”week”> is used to define a week and a year control field

Syntax: 



<input type="week">

Example: 




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML Input Type week
    </title>
</head>
<style>
    #Geek_p {
        font-size: 30px;
        color: green;
    }
</style>
 
<body style="text-align:center;">
 
    <h1 style="color:green;">
            GeeksForGeeks
        </h1>
 
    <h2>HTML &lt;Input Type="week"&gt;
</h2>
    <form>
        <input type="week">
        <br>
        <br>
 
    </form>
</body>
 
</html>

Output:



  

Supported Browsers: The browser supported by HTML Input type=”week” are listed below:

Article Tags :