Html5 Command Type Attribute Tag

The html 5 command type attribute tag is use to the radio button and checkbox.The command type attribute tag was introduced in HTML 5. The command type attribute tag did not exist in older versions of HTML.In this type attribute value is checkbox , command , radio.

Syntax:

<command type = "value">

Example Code

<!DOCTYPE HTML>
<menu>
  <command onclick="alert('Good Morning!')" type="radio" type="group1"> Click This! </command>
  <command onclick="alert('Good After Noon!')"> Click This! </command>
  <command onclick="alert('Good Night!')"> Click This! </command>
</menu>

Out Put :




Click This!
Click This!
Click This!

In the above example type = "radio" is a one type of command types attribute.type = "group1" is a menu type attribute for a command type.





Content