Global Attributes Flashcards
accesskey=””
Access key attribute
Specifies a shortcut key to
activate and focus an element
Mus be a single alphanumeric
class=””
Class attribute specifies class names for the element to point to a class in a stylesheet
contenteditable=””
Content editable specifies whether:
true: content can be edited
false: content cannot be edited
data-*=””
allows string data to be associated to the element
- can be any name
dir=””
The direction attribute specifies
the text direction of the element
ltr : left to right
rtl : right to left
auto : browser defined
draggable=””
true: can drag the element
false: cannot drag the element
auto: browser defined
hidden
Hides a specified element by default
Used for what is not yet relevant
Or what is no longer relevant
id=””
assigns a unique id to the element
helps to style and
manipulate the DOM
lang=””
The language attribute specifies
what language code is used for the
element
i.e. “fr” French, “en” English
spellcheck=””
true|false can be used in:
Text values in input elements
(Not Password)
editable elements
style=””
The style attribute allows for
in-line styling of elements
(not preferable)
tabindex=”n”
n being an integer
Sets the order elements are selected
with the tab key
title=””
The title attribute adds tooltip
text to an element
(mouse over)
translate=””
yes|no
Specifies whether an element should
be translated
role=””
Assigns an aria role to an element for screen readers and other accessibility tools