Appendix B. XHTML Element Reference

This appendix is a quick reference to the elements that are in the HTML and XHTML recommendations. They are listed with the attributes each element can carry and a brief description of their purpose.

Deprecated elements are marked with the word "deprecated" next to them. You should avoid using these elements where possible. I also recommend that stylistic markup and elements be replaced with CSS rules.

The first version of Internet Explorer (IE), Netscape (N), and Firefox (FF) that supported the element are given next to the element's name, starting with IE3, N3, and FF1. Elements that were supported in Netscape will also be supported in Firefox. The notation "all," identifies elements that are supported in all browsers from IE3, N3, FF1, and later. Note, however, that not all the attributes will work with the same versions of the browsers—some attributes were introduced in later versions.

Consider the following notes on syntax:

  • All element names should be given in lowercase.

  • Any attribute listed without a value should have the name of the attribute repeated as its value in order to be XHTML-compliant; for example: disabled = "disabled".

  • All attribute values should also be given inside double quotation marks.

Core Attributes

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

class = name

Specifies a class for the element to associate it with rules in a style sheet

dir = ltr | rtl

Specifies the direction for ...

Get Beginning Web Programming with HTML, XHTML, and CSS, Second Edition 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.