html div attributes include: align, accesskey, class, id, lang, style, title, hidden, "data-*", draggable, dropzone, spellcheck, tabindex, translate, etc.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
The
What are the attributes of html div?
Attributes can provide some additional information for HTML tags, or modify HTML tags. Attributes need to be added in the start tag, and the syntax format is:
attr="value"
attr represents the attribute name, and value represents the attribute value. Attribute values must be surrounded by double quotes " " or single quotes ' '.
There are many HTML attributes, which can be roughly divided into two categories:
Some attributes are applicable to most or all HTML tags. We call these attributes universal attributes;
Some attributes are only applicable to one or a few specific HTML tags. We call these attributes special attributes.
Special properties for div:
Attribute | Value | Description |
---|---|---|
left | right center justify | Specifies the content in the
Common attributes of div:
Description | |
---|---|
Set the keyboard shortcut for accessing elements. | |
Specifies the class name of the element | |
Specifies whether it can be edited The content of the element. | |
Specifies the context menu of an element. When the user right-clicks the element, a context menu appears | |
Used to store custom data for the page | |
Set the text direction of the content in the element. | |
Specify whether an element can be dragged | |
Specify whether to drag data Copy, move, or link, or delete | |
The hidden attribute specifies that the element is hidden. | |
Specifies the unique id of the element | |
Set the language code of the content in the element . | |
Detect whether the element is spelled incorrectly | |
Specify the inline style of the element (inline style) | |
Set the tab key control order of elements. | |
Specifies additional information for the element (can be displayed in a tooltip) | |
Specify whether the value of an element needs to be translated when the page is loaded |
html video tutorial"
The above is the detailed content of What attributes does html div have?. For more information, please follow other related articles on the PHP Chinese website!