Home Fun Games Blog CDCRIFD CDRD Utilities About Settings

HTML contenteditable Attribute

The contenteditable attribute, when set to true, makes the content of an element editable (hence the name).

Syntax: contenteditable="Boolean value"

Here's a code snippet:

        <div style="border: 2px solid #000000; width: 250px; height: 250px; padding: 5px;" contenteditable="true">
  <p>I can be edited!!!</p>
  <p>In Chrome, you can press (on the keyboard) Ctrl + B for <b>bold</b>, Ctrl + I for <i>italic</i>, and Ctrl + U for <u>underline</u>.</p>
  <button>My content can be edited too (if not working, try double-clicking)!!!</button>
</div>

When run, this will be the result (click inside the <div> and change stuff).

To edit other webpages (temporarily, current session only), drag the hilarious "Edit Webpage" and "Save Webpage Edits" bookmarklets (located here) to your bookmarks bar.

Last updated Sat Apr 29 2017 20:21:58 GMT-0500 (Central Standard Time)