What new global attributes are added to HTML5?
Attributes: 1. contenteditable attribute; 2. contextmenu attribute; 3. "data-*" attribute; 4. draggable attribute; 5. dropzone attribute; 6. hidden attribute; 7. spellcheck attribute; 8. translate Attributes.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
What new global attributes are added to HTML5?
In HTML, global attributes are attributes that can be used with all HTML elements.
In html5, there are eight new global attributes. Let’s take a look at each one below.
1. contenteditable attribute
The contenteditable attribute specifies whether the element content is editable.
Note: When the contenteditable attribute is not set in an element, the element will inherit from the parent element.
The syntax is:
<element contenteditable="true|false">
The example is as follows:
<html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <p contenteditable="true">这是一个段落。是可编辑的。尝试修改文本。</p> </body> </html>
Output result:
##2, contextmenu Attribute
Currently only the Firefox browser supports the contextmenu attribute. The contextmenu attribute specifies the context menu of the element. A context menu will appear when the user right-clicks an element. The value of the /p>contextmenu attribute is the id of the
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an
