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_labels | Defines a space-separated list of hotkeys/keyboard shortcuts for the current element. |
class = list_of_class_names | Specifies a space-separated list of CSS classes for the current element. |
contenteditable = true | false | "" | empty | Indicates whether the element is editable by the user. |
contextmenu = id | Specifies the id of an HTML element to serve as a context menu for the current element. |
dir = ltr | rtl | auto | Defines a unique identification value for that element within the document. |
draggable = true | false | Specifies whether the element should be draggable. |
dropzone = copy | move | link | Specifies which kind of content can be dropped on an element. |
hidden = hidden | "" | empty | The boolean attribute indicates whether the element is hidden. |
id = id | Specifies a unique identifier for an element. |
lang = language_tag | Specifies the (human) language for ... |
Get Beginning HTML and CSS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.