This page is describing the attributes assigned only to semantic group of HTML5 elements.

Attributes and related elements:

open attribute:

<details><dialog>

label attribute:

<menu><menuitem>

type attribute:

<menu><menuitem>

checked attribute:

<menuitem>

command attribute:

<menuitem>

default attribute:

<menuitem>

disabled attribute:

<menuitem>

icon attribute:

<menuitem>

radiogroup attribute:

<menuitem>

datetime attribute:

<time>

Attribute characteristics and purpose:

open attribute:

  • <details>defines that the <details> tag should be opened by default
  • <dialog>: if set to open, it will make the dialog box opened by default

label attribute:

  • <menu>: defines a name for the visible label for the menu
  • <menuitem>: this attribute is required and used to specify the item's name shown to the user

type attribute:

  • <menu>: defines the type of the menu to use; It may be:
    • list; In the form of popup, representing a group of commands activated through another element
    • toolbar; Specifies a toolbar type of a menu where active commands let a user interact immediately
    • context; Specifies a context type of a menu where menu must be activated before user is allowed to interact with it
  • <menuitem>: defines whether the item is a command or a menu item; the default is a command; this attribute may be:
    • checkbox; The command may be toggled as a checkbox
    • command; Default selection; Specifies a regular command as the action
    • radio; The command may be toggled as a radio button

checked attribute;

  • indicates whether the command is selected during page loading; it may only be used when the type attribute is checkbox or radio

command attribute:

  • specifies the ID of a separate element, indicating a command to be invoked indirectly; it may not be used within a menu item that also includes the attributes checked, disabled, icon, label, radiogroup or type

default attribute:

  • indicates which command or menu item to be a default

disabled attribute:

  • indicates that the command or menu item should be disabled

icon attribute:

  • specifies the URL of an icon / picture that will represent the command or menu item

radiogroup attribute:

  • specifies the name of the group of commands or menu items that will be toggled when a button is selected (only for radio buttons)

datetime attribute:

  • defines the date/time of the <time> element

Examples

Example with semantic elements menu and menuitem attributes:

Example with semantic elements details, dialog and time attributes:

 

›› go to examples ››