Global Properties in HTML 5

Source: Internet
Author: User

1. contenteditable--is editable using the child element under this attribute. property is True/false

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Contenteditable Property Example</title></Head><Body>    <H2>Editable list</H2>    <ulcontenteditable= "true">        <Li>List element 1</Li>        <Li>List Element 2</Li>        <Li>List Element 3</Li>    </ul></Body></HTML>

2, designmode--all the elements under the entire visible page (body) can be edited, note: This property can be used in JavaScript property values: On/Off

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>DesignMode Property Example</title></Head><Body>    <H2>Can be edited</H2>    <ul>        <Li>Can be edited</Li>        <Li>Can be edited</Li>        <Li>Can be edited</Li>    </ul>    <Script>Document.designmode= " on"; </Script></Body></HTML>

3, spellcheck only for textarea and input, its function of the user input text content for spelling and grammar check. Note If the readonly or disabled of the element itself is true, then the spell check is not performed

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>SpellCheck</title></Head><Body>    <!--spellcheck only for textarea and input, its function is to check the text content entered by the user in spelling and grammar. Note If the readonly or disabled of the element itself is true, then the spell check is not performed -    <textareaspellcheck= "true"></textarea>    <inputtype= "text"spellcheck= "false"></Body></HTML>

Global Properties in HTML 5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.