HTML5 basic knowledge------Global Properties

Source: Internet
Author: User

Global properties: Refers to the properties that can be used on any element.

Contenteditable Properties: The main function is to allow the user to edit the contents of the element, so the element must be the element that can get the mouse focus, and after clicking the mouse to provide the user with a caret, prompting the user that the content of the element allows editing.

The Contenteditablee property is a Boolean property that can be specified as true or false. In addition, this property has a hidden inherit (inherited) state, when the property is true, the element is specified to allow editing, and when the property is False, element is specified to not allow editing, when True or false is not specified, it is determined by the inherit state, and the element is editable if the parent element of the element is editable.

The DesignMode property is used to specify whether the entire page can be edited, and any element in the page that supports the contenteditable attribute described above becomes editable when the page is editable. The DesignMode property can only be edited and modified in JavaScript scripts. This property has 2 values---"On" and "off". When the property is specified as "on", the page is editable and is specified as "off" when the page is not editable.

All elements of the hidden property in HTML5 allow a hidden property, similar to a hidden element in the input element, to inform the browser not to render the element, leaving the element invisible, but the contents of the element are still created by the browser, That is, after the page is loaded, it is allowed to use a JavaScript script to cancel the property, and the element becomes visible after it is canceled. The contents of the element are also displayed instantly. The Hidden property is a Boolean property, and when set to True, the element is not visible and when set to False, the element is visible.

SpellCheck Property

The SpellCheck property is a new property provided by the text input boxes of the HTML5 element (input) and Textaera, whose function is to check spelling and grammar for the text content entered by the user, and the SpellCheck property is a Boolean property. Has a value of true or false two, but it has a special place in writing that must explicitly declare that the property value is True or False

Eg: <textarea spellcheck = "true" >

<input type= "text" spellcheck= "false" >

It is important to note that if the element's ReadOnly property or the Disabled property is set to True, the spell check is not performed.

HTML5 basic knowledge------Global Properties

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.