Appendix B

HTML Element Reference

This appendix is a quick reference to the elements in the W3C HTML5 Candidate Recommendation. They are listed with the attributes each element can carry and a brief description of their purpose.

Note that if an attribute can be “empty,” that means it can be set without a value. For instance,

<span contenteditable> ... </span>

Also, obsolete attributes are not included here. They are listed in Appendix I, “Changes between HTML4 and HTML5,” for your reference.

Core Attributes

Unless otherwise stated, the core attributes can be used with all the elements in this appendix.

accesskey = list_of_key_labelsDefines a space-separated list of hotkeys/keyboard shortcuts for the current element.
class = list_of_class_namesSpecifies a space-separated list of CSS classes for the current element.
contenteditable = true | false | "" | emptyIndicates whether the element is editable by the user.
contextmenu = idSpecifies the id of an HTML element to serve as a context menu for the current element.
dir = ltr | rtl | autoDefines a unique identification value for that element within the document.
draggable = true | falseSpecifies whether the element should be draggable.
dropzone = copy | move | linkSpecifies which kind of content can be dropped on an element.
hidden = hidden | "" | emptyThe boolean attribute indicates whether the element is hidden.
id = idSpecifies a unique identifier for an element.
lang = language_tagSpecifies the (human) language for ...

Get Beginning HTML and CSS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.