Open In App
Related Articles

HTML | type Attribute

Improve Article
Save Article
Like Article

The HTML type Attribute is used to specify the type of button for <button> elements. It is also used in the <input> element to specify the type of input to display. For embed elements like link, object, script, source, and style used to specify the Internet Media Type. 


<element type="value"> 

Note: This attribute has been DEPRECATED and is no longer recommended.

Supported Tags: 

  • <a>
  • <area>
  • <embed>
  • <input>
  • <link>
  • <menu>
  • <object>
  • <script>
  • <source>
  • <style>

The below example illustrates the use of type attribute in HTML:



<!DOCTYPE html>
            HTML type Attribute
        <h3>HTML type Attribute</h3>
        <form action="#" method="get">
            Username: <input type="text" name="uname">
            Password: <input type="password" name="pwd">
            <button type="submit" value="submit">
            <button type="reset" value="reset">


Supported Browsers: The browser supported by HTML type attributes are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 06 Jun, 2022
Like Article
Save Article
Similar Reads
Complete Tutorials