Forma saysGlobal attributes work on any element: id, class, style, title, hidden, tabindex, contenteditable, and data-*.
Some attributes aren't tied to one element — they apply everywhere. The everyday set: id, class, style, title, lang, hidden. The powerful ones: data-* (store custom data read via element.dataset), contenteditable (make anything editable), tabindex (control focus order), draggable, spellcheck.
The data-* attributes are the sanctioned way to attach your own info to elements without inventing non-standard attributes — JS reads them straight off dataset.
Power-ups you unlock
Global attributes apply to any element
data-* stores custom data, read via element.dataset
contenteditable makes content directly editable
tabindex controls focus order; hidden hides an element
Captain Invalid Input attacks — common mistakes
Inventing custom attributes instead of using data-*
tabindex values above 0 (creates a confusing focus order)
Trusting contenteditable content without sanitizing it
Boss battleStore a value in a data-* attribute and read it via dataset in JS, then make a paragraph contenteditable.