Reply
ID instead of NAME?
Old 04-20-2008, 09:17 PM ID instead of NAME?
Extreme Talker

Posts: 162
I was just re-reading the XHTML rules and one thing I noticed was that it says that 'name' is now deprecated. I can understand this for elements because everyone is going to be unique, but if I am going <div name="style"> is that ok? My understanding was you use name if it occurs more than one, so if I use "style" more than once, and id if it only happends once.

Is that true or should I never use name anymore?
__________________
DVD Movie Release Database: http://www.couchpotatoesonline.com
Truly is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-20-2008, 10:13 PM Re: ID instead of NAME?
A Monkey Typing's Avatar
Super Talker

Latest Blog Post:
Valid Markup and the W3C
Posts: 117
Location: Northeastern PA
The Div tag does not support a "name" attribute reference.

I'm having trouble wrapping my head around why you're trying to use an anchor attribute for a division. Can you give an example of what you're trying to accomplish?
__________________
2MonkeysTyping Webdesign Monkeybusiness

Last edited by A Monkey Typing : 04-20-2008 at 10:26 PM. Reason: added reference
A Monkey Typing is offline
Reply With Quote
View Public Profile Visit A Monkey Typing's homepage!
 
Old 04-20-2008, 10:28 PM Re: ID instead of NAME?
Extreme Talker

Posts: 162
Wow I totally spaced out when I wrote that. No wonder I didnt "notice" that before, it doesnt make any sense.

I was thinking "class" when I said name.... lets just forget about this post :P
__________________
DVD Movie Release Database: http://www.couchpotatoesonline.com
Truly is offline
Reply With Quote
View Public Profile
 
Old 04-20-2008, 10:34 PM Re: ID instead of NAME?
A Monkey Typing's Avatar
Super Talker

Latest Blog Post:
Valid Markup and the W3C
Posts: 117
Location: Northeastern PA
It happens to the best of us
__________________
2MonkeysTyping Webdesign Monkeybusiness
A Monkey Typing is offline
Reply With Quote
View Public Profile Visit A Monkey Typing's homepage!
 
Old 04-21-2008, 12:15 AM Re: ID instead of NAME?
wayfarer07's Avatar
Insomniac

Posts: 537
Name: Abel Mohler
Location: Asheville, North Carolina USA
I'm confused... are you saying that the "class" attribute is depreciated?? It certainly isn't...
__________________
Go FREELANCE <=====||=====> Hire Me
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 04-21-2008, 09:29 AM Re: ID instead of NAME?
A Monkey Typing's Avatar
Super Talker

Latest Blog Post:
Valid Markup and the W3C
Posts: 117
Location: Northeastern PA
What's being depreciated is the use of the attribute "name" in the below elements:

Quote:
HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.
http://www.w3schools.com/xhtml/xhtml_syntax.asp
__________________
2MonkeysTyping Webdesign Monkeybusiness
A Monkey Typing is offline
Reply With Quote
View Public Profile Visit A Monkey Typing's homepage!
 
Old 04-21-2008, 10:10 AM Re: ID instead of NAME?
LadynRed's Avatar
Super Moderator

Posts: 6,019
Location: Tennessee
You should not be using <a name="top"></a> for anchors. You SHOULD be using ID's instead and they work with old browser versions. So, instead of adding a lot of extra code for anchors, you just use an ID on an element instead such as:

<body id="top"> - a link down the page for 'go to top' would be the same: <a href="#top">top</a>
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-21-2008, 12:38 PM Re: ID instead of NAME?
Gilligan's Avatar
Dead Like Me

Posts: 1,572
Name: Stefan
Location: London, UK
But you could always just link to filename.html# to go to the top

<a href="#">We all love Gilligan</a>

Subliminal messaging...we all love it
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-21-2008, 02:52 PM Re: ID instead of NAME?
Extreme Talker

Posts: 162
Ya I had been reading stuff for a long time and mixed up the two (classes and names) and I thought they were saying when we were using css we werent supposed to use classes anymore. That was my cue to go get some sleep
__________________
DVD Movie Release Database: http://www.couchpotatoesonline.com
Truly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ID instead of NAME?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15803 seconds with 13 queries