Abimaran Kugathasan
Abimaran Kugathasan

Reputation: 32458

id and name attributes of HTML 4.01 and XHTML 1

In HTML, the name attribute may be used for the elements a, applet, form, frame, iframe, img, and map. The name attribute and the id attribute may be used in HTML to identify document fragments. XHTML documents must use id instead of name for identifying document fragments in the aforementioned elements. In fact, the name attribute for these elements has been deprecated in the XHTML 1.0 specification. Then how do they replace the requirement of name attribute in XHTML? Because, for some tags, radio buttons, etc, name attribute will be useful, when a radio button clicked from multiple radio buttons. So, how does XHTML handle this?

Thanks!

Upvotes: 0

Views: 1836

Answers (1)

Alohci
Alohci

Reputation: 82976

The name attribute is not deprecated for <input> elements (such as radio buttons) in XHTML. It's only deprecated for those elements that you list.

Upvotes: 3

Related Questions