Skip to Content
Learning Web Design, 5th Edition
book

Learning Web Design, 5th Edition

by Jennifer Robbins
May 2018
Beginner content levelBeginner
808 pages
25h 3m
English
O'Reilly Media, Inc.
Content preview from Learning Web Design, 5th Edition

B. HTML5 Global Attributes

B

HTML5 Global Attributes

The following attributes may be used with any HTML element.

Attribute

Values

Description

accesskey
single text character

Assigns an access key (shortcut key command) to the link. Access keys are also used for form fields. Users may access the element by pressing Alt-<key> (PC) or Ctrl-<key> (Mac). Example: accesskey="B"

class
text string

Assigns one or more classification names to the element. Multiple values are separated by spaces.

contenteditable

true | false

Indicates the user can edit the element. If the value is an empty string, it is the same as “true.” By default, the element inherits the edit setting from its parent.

dir

ltr | rtl | auto

Specifies the inline text direction of the element (“left to right” or “right to left”) and scopes bidirectional reordering, isolating the text from influencing surrounding content. When set to auto, it uses the first letter to determine direction.

draggable

true | false

A true value indicates the element is draggable in the UI (an event configured with JavaScript), meaning the user can move it by clicking and holding it, and then moving it to a new position in the window.

hidden

In HTML, list value only: hidden

In XHTML, include attribute name: hidden="hidden"

Prevents the element and its descendants from being rendered in the user agent (browser). Any scripts or form controls in hidden sections will still execute ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Web Design, 4th Edition

Learning Web Design, 4th Edition

Jennifer Robbins

Publisher Resources

ISBN: 9781491960196Errata Page