HTML 4 defined the name
attribute for the
elements a
, applet
, form
,
frame
, iframe
, img
, and
map
. HTML 4 also introduced the id
attribute. Both of these attributes are designed to be used as
fragment identifiers.
In XML, fragment identifiers are of type ID
, and
there can only be a single attribute of type ID
per
element. In order to ensure that XHTML 1.0 documents are
well-structured XML documents, XHTML 1.0 documents MUST use
id
when defining fragment identifiers, even on
elements that historically have also had a name
attribute.
Note that in XHTML 1.0, the name
attribute of
these elements is formally deprecated, and will be removed in a
subsequent version of XHTML.