W3Schools.com

HTML5 <command> checked Attribute

HTML5 command Tag Reference HTML5 <command> tag

Example

A pre-selected <command> element:

<menu>
<command type="radio" label="Left" checked="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.


Syntax

<command checked="checked">

Note: The checked attribute is a boolean attribute, and can be set in the following ways:

  • <command checked>
  • <command checked="checked">
  • <command checked="">

HTML5 command Tag Reference HTML5 <command> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE