Universal or Common html Attributes

Main Attributes

DO NOT use in tags: script, html, head, param, meta, base, title, and style.

Attribute Description Value
title Name of the element. title
id A unique id for the tag. id-name
class Class of the tag. class-name
style A style variation. style-variation

Keyboard Attributes

DO NOT use in tags: hr, param, script, iframe, base, frameset, br, and frame.

Attribute Description Value
accesskey Keyboard shortcut ("HOTKEY"). character
tabindex Tab order. number

Language Attributes

Attribute Description Value
lang Sets the language code. language code
dir Direction of text. rtl or ltr


Back to the html reference and tutorials page.