Chapter 37: Global Attributes

AttributeDescription
classDefines one or more class names for an element. See Classes and IDs.
contenteditableSets whether the content of an element can be edited.
contextmenuDefines a context menu shown when a user right-clicks an element.
dirSets the text direction for text within an element.
draggableSets whether an element can be dragged.
hiddenHides an element not currently in use on the page.
idDefines a unique identifier for an element. See Classes and IDs.
langDefines the language of an element’s content and its text attribute values. See Content
Languages.
spellcheckSets whether to spell/grammar check the content of an element.
styleDefines a set of inline CSS styles for an element.
tabindexSets the order in which elements on a page are navigated by the tab keyboard shortcut.
titleDefines additional information about an element, generally in the form of tooltip text on
mouseover.
translateDefines whether to translate the content of an element.

Read More

Chapter 36: Tabindex

ValueMeaning
negativeelement will be focusable, but it should not be reachable via sequential keyboard navigation
0element will be focusable and reachable through keyboard sequential navigation, but it’s relative order is
defined by the platform convention
positiveelement must be focusable and accessible via sequential keyboard navigation; it’s relative order will be
defined by the attribute value: the sequential follow the increasing number of the tabindex

Read More

Chapter 31: SVG

SVG stands for Scalable Vector Graphics. SVG is used to define graphics for the Web

The HTML <svg> element is a container for SVG graphics.

SVG has several methods for drawing paths, boxes, circles, text, and graphic images.

Inline SVG

SVG can be written directly into a HTML document. Inline SVG can be styled and manipulated using CSS and
JavaScript.

Read More

Chapter 30: Content Languages

Base Document Language

It’s a good practice to declare the primary language of the document in the html element:

<html lang="en">

If no other lang attribute is specified in the document, it means that everything (i.e., element content and attribute
text values) is in that language.

If the document contains parts in other languages, these parts should get their own lang attributes to “overwrite”
the language declaration.

Read More

Chapter 29: IFrames

AttributeDetails
nameSets the element’s name, to be used with an a tag to change the iframe’s src.
widthSets the element’s width in pixels.
heightSets the element’s height in pixels.
srcSpecifies the page that will be displayed in the frame.
srcdocSpecifies the content that will be displayed in the frame, assuming the browser supports it. The
content must be valid HTML.
sandboxWhen set, the contents of the iframe is treated as being from a unique origin and features
including scripts, plugins, forms and popups will be disabled. Restrictions can be selectively
relaxed by adding a space separated list of values. See the table in Remarks for possible values.
allowfullscreenWhether to allow the iframe’s contents to use requestFullscreen( )

Read More

Pin It on Pinterest