contenteditable Attribute
Description
The contenteditable
attribute is new in HTML5 and
allows the user to change the content in the page.
Example
<!DOCTYPE HTML>
<html>
<body>
<p contenteditable="true">It is raining right now</p>
</body><!-- w ww.ja v a 2 s .c o m-->
</html>
The code above applies the contenteditable
attribute
to a p
element.
Setting the attribute value to true
allows the user to edit the element contents,
and setting it to false
disables this feature.
If you don't specify a value, the element inherits the setting for this property from its parent.
The user clicks on the text and starts to type.