w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



html contextmenu attribute

The contextmenu attribute on the html element:

Examples

<htmlattribute="value(s)">...<⁄html>example
4.contextmenu=menu id value<html contextmenu="cmenu"> ... <⁄html>

"menu_id_value" = this value is unique on page;
must be found attached to a <menu> tag, as value of the 'id' attribute

Video demonstration html contextmenu attribute

HTML5 html contextmenu attribute Tutorial

min video details
00:02 launch file contextmenu.php in browser
00:05 open file contextmenu.php in Notepad++
00:12 contextmenu attribute's value: the value of the id attribute attached to HTML menu tag
00:15 contextmenu attribute, value: menu_id, applied on html starting tag
00:35 saving the modifications in Notepad++ and refreshing the file in browser
00:38 testing: <html contextmenu="menu_id">
00:39 result: 2 defined commands are available in a content menu: "add border" and "remove border"
00:59 explanations: how the contextmenu has been created ..

Note: contextmenu attribute is not yet supported in browsers
html intro html optional html occurrences html browser display html children html syntaxhtml manifest attribute introappcache CACHE sectionappcache NETWORK sectionappcache FALLBACK sectionappcache ADVANTAGESappcache DISADVANTAGEappcache fixes: 1aappcache fixes: 1bappcache fixes: 2aappcache fixes: 2bappcache fixes: 2cappcache fixes: 3html class attributehtml contenteditable attributehtml dir attributehtml hidden attributehtml id attributehtml lang attributehtml spellcheck attributehtml style attributehtml title attributehtml translate attribute