Table of Contents
HTML public attributes
Home Web Front-end HTML Tutorial What are the public attributes of html tags?

What are the public attributes of html tags?

Apr 22, 2024 pm 12:00 PM
css access

HTML public attributes are applicable to all HTML elements and are used to set basic characteristics, including: setting unique identifier (id) setting class name (class) setting prompt text (title) inline setting style (style) setting Language code (lang) Set writing direction (dir) Set tab key index (tabindex) Set shortcut key (accesskey) Hidden element (hidden) Allow users to edit content (contenteditable)

What are the public attributes of html tags?

HTML public attributes

HTML public attributes are applicable to all HTML elements and are used to set the basic characteristics of the elements, including:

1. id

  • Set the element's unique identifier, used to reference the element in scripts and style sheets.

2. class

  • Set the class name of the element, which is used to group similar elements and apply common styles and scripts.

3. title

  • Set the prompt text of the element, which is displayed when the mouse hovers over the element.

4. style

  • Set the style of an element inline, using CSS syntax.

5. lang

  • Set the language code of the content in the element.

6. dir

  • Set the writing direction (ltr or rtl) of the element text.

7. tabindex

  • Set the index of the element in the tab order.

8. accesskey

  • Set the shortcut key for the element to facilitate keyboard navigation.

9. hidden

  • Hide the element so that it is not visible on the page.

10.contenteditable

  • Allows users to edit the content of an element.

The above is the detailed content of What are the public attributes of html tags?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications May 07, 2024 pm 04:20 PM

How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications

How to convert deepseek pdf How to convert deepseek pdf Feb 19, 2025 pm 05:24 PM

How to convert deepseek pdf

What does placeholder mean in vue What does placeholder mean in vue May 07, 2024 am 09:57 AM

What does placeholder mean in vue

What does span mean in js What does span mean in js May 06, 2024 am 11:42 AM

What does span mean in js

How to cross-domain iframe in vue How to cross-domain iframe in vue May 02, 2024 pm 10:48 PM

How to cross-domain iframe in vue

What does rem mean in js What does rem mean in js May 06, 2024 am 11:30 AM

What does rem mean in js

How does the Java reflection mechanism modify the behavior of a class? How does the Java reflection mechanism modify the behavior of a class? May 03, 2024 pm 06:15 PM

How does the Java reflection mechanism modify the behavior of a class?

Common exception types and their repair measures in Java function development Common exception types and their repair measures in Java function development May 03, 2024 pm 02:09 PM

Common exception types and their repair measures in Java function development

See all articles