HTML5 date attribute in <input> Tag Last Updated : 04 Aug, 2023 Comments Improve Suggest changes Like Article Like Report The date attribute in the input tag creates a calendar to choose the date, which includes day, month, and year. Syntax: <input type = "date">Example 1: Use date attribute in input tag html <!DOCTYPE html> <html> <head> <title>Date Attribute</title> </head> <body> <form action="/"> Date of Birth: <input type="date"> </form> </body> </html> Output: Example 2: Initializing the default date value in input tag. The date format is value = "yyyy-mm-dd" in input tag html <html> <head> <title>Date Attribute</title> </head> <body> <form action="/"> Date of Birth: <input type="date" value="2018-10-19"> </form> </body> </html> Output: Example 3: DOM for date attribute html <!DOCTYPE html> <html> <head> <title>Date Attribute</title> </head> <body> Date of Birth: <input type="date" id="dob"> <button onclick="dateDisplay()"> Submit </button> <p id="demo"></p> <script> function dateDisplay() { let x = document.getElementById("dob").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html> Output: Output in the phone: Comment More infoAdvertise with us Next Article HTML5 Semantics B bilal-hungund Follow Improve Article Tags : HTML Technical Scripter 2018 HTML-Attributes Similar Reads Difference between HTML and HTML5 HTML stands for Hyper Text Markup Language. It is used to design web pages using a markup language. HTML is a combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within the tag which defines the structu 4 min read HTML5 Semantics HTML5 introduced a range of semantic elements that clearly describe their purpose in human and machine-readable language. Unlike non-semantic elements, which provide no information about their content, semantic elements clearly define their content. For instance, <form>, <table>, and 6 min read HTML header Tag The <header> tag is a semantic HTML element that is used to define the introductory or navigational content of a webpage or a section. Typically, a header contains elements like:The website or page titleLogo or brandingNavigation menusSearch barAny introductory information relevant to the page 4 min read HTML aside Tag The <aside> tag is used to describe the main object of the web page more shortly like a highlighter. It identifies the content that is related to the primary content of the web page but does not constitute the main intent of the primary page. The <aside> tag contains mainly author inform 2 min read HTML footer Tag The <footer> tag in HTML is used to define the footer section of an HTML document.The footer section typically contains information such as contact information, sitemap, back-to-top links, related documents, copyright, etc.The footer tag is a semantic tag included in HTML (in 2014) along with 4 min read HTML5 <summary> Tag The HTML <summary> tag defines a summary for the <details> element. The <summary> tag is used along with the <details> element and provides a summary visible to the user. When the user clicks the summary, the content placed inside the <details> element becomes visible w 3 min read HTML details Tag The <details> tag in HTML is used to create a disclosure widget from which the user can view or hide additional information. It is used with the <summary> tag, which provides the title or header for the details section. It's generally used for FAQs, dropdown menus, or to show/hide additi 2 min read HTML dialog Tag The <dialog> tag in HTML5 defines a dialog box or window. It can be used for pop-up notifications, messages, or custom user interactions. The <dialog> element can be shown or hidden using JavaScript, providing a native way to create modal interfaces.HTML<!DOCTYPE html> <html> 2 min read HTML bdi Tag The <bdi> tag in HTML stands for "Bi-Directional Isolation." It is used to isolate a part of text that might be formatted in a different direction than the surrounding text. This is particularly useful in multilingual applications where text in different languages may be displayed together, an 2 min read HTML5 rt Tag The <rt> tag in HTML is used to define the explanation of the ruby annotation which is a small text, attached with the main text. Such kind of annotation is used in Japanese publications. This tag is new in HTML5.Syntax:Â Â <rt> Explanation... </rt>Example 1: This example describes 2 min read Like