THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <command> checked Attribute

HTML command Tag Reference HTML <command> tag

Example

A pre-selected <command> element:

<menu>
<command type="radio" label="Left" checked
onclick="setAlign('left')">Left</command>
</menu>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The checked attribute is currently not supported in any of the major browsers.


Definition and Usage

The checked attribute is a boolean attribute.

When present, it specifies that the command should be checked (pre-selected) when the page loads.

Note: This attribute can only be used if type="checkbox" or type="radio".


Differences Between HTML 4.01 and HTML5

The <command> tag is new in HTML5.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the checked attribute must be defined as <command checked="checked">.


Syntax

<command checked>

HTML command Tag Reference HTML <command> tag

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: