By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,677 Members | 1,807 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,677 IT Pros & Developers. It's quick & easy.

xhtml--id OR name--

100+
P: 254
The id attribute and name attribute in xhtml.

I read from w3schools.com that ALL name attribute is replaced by id attribute.

so this code
Expand|Select|Wrap|Line Numbers
  1. ...
  2. <input type="checkbox" name="checkbox1" value="value" checked="checked" />CheckBox 1
  3. <br />
  4. ...
  5.  
should changed to
Expand|Select|Wrap|Line Numbers
  1. ...
  2. <input type="checkbox" id="checkbox1" value="value" checked="checked" />CheckBox 1
  3. <br />
  4. ...
  5.  
I mean in XHTML.
Also there is another question, checked="checked" is correct right?

from
nick
Feb 1 '07 #1
Share this Question
Share on Google+
2 Replies


drhowarddrfine
Expert 5K+
P: 7,435
On your first question, yes, XHTML is XML and the name attribute is not allowed. Here's the official word on that from the W3C.

And your second question is correct, too.
Feb 1 '07 #2

100+
P: 254
thanks mod.

:)
Feb 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.