XHTML has removed the "name" attribute.

But the JavaScript method for reading radio buttons requires the "name" attribute to be the same on each radio button.

W3C says to use "id", but that no more than one "id" is valid.

I need to write an XHTML page with radio buttons. How?

Recommended Answers

All 2 Replies

'name' has not been deprecated. Without it forms won't work any more.

The information I had was wrong.

The validator was confused by a couple of unampersanded quotes in different value strings. They made the validator think it was dealing with a different tag. But it didn't tell me what tag it thought was there.

I got the solution from a helpful guy at W3C.

Name is deprecated in all uses except form.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.