Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • contenteditable Attribute in Html5

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 406
    Comment on it

    contenteditable Attribute:

    ContentEditable attribute provides the user to edit the content of html element. If the attribute is present and its value is true user can easily edit content of an html element and if value is false user cannot edit the content.

    Syntax:

    <element contenteditable="true|false"> 

    Attribute Value:

     

    Value Description
    true Indicates that the element is editable
    false Indicates that the element is not editable

     

    Example:

    <!DOCTYPE html>
    <html>
    <body>
    
    <p contenteditable="true">This is a paragraph. It is editable. Try to change this text.</p>
    <p contenteditable="false">This is a paragraph. It is editable. Try to change this text.</p>
    
    </body>
    </html>

    In the above example the first <p> tag content is editable as its value (contenteditable="true") is true and the second <p> tag content is not editable as its value is false(contenteditable="false").

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: