What are the public attributes of html tags?

下次还敢
Release: 2024-04-22 12:00:26
Original
1137 people have browsed it

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!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!