HTML5 Attributes
By Saket Bhatnagar••Beginner to Intermediate
contenteditable
- 1contenteditable is an HTML attribute that allows users to edit the content of an element directly on the web page.
- 2By default it is set to false i.e, user cannot edit or modify the content.
- 3When the attribute is set to true, users can double-click on the element to edit/change the content.
- 4Example:- <p contenteditable='true'>This text can be edited by the user.</p> (Here, the user can modify the content of the paragraph.)
accesskey
- 1accesskey attribute is used to specify a shortcut key to activate or trigger something.
- 2Example:- <a href='https://www.google.com' accesskey='k'>Google</a> (Here, this link can be triggered by using the accesskey 'k' along with the binding keys.)
- 3The binding key for chrome and Edge is Alt + accesskey , binding key for firefox is Alt+Shift+accesskey.
- 4Note :- These key bindings may vary depending on the operating system and web browser being used.