Reply
Old 04-20-2008, 09:17 PM ID instead of NAME?
Truly's Avatar
Ultra Talker

Posts: 302
Trades: 0
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 online now
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
Trades: 0
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?
Truly's Avatar
Ultra Talker

Posts: 302
Trades: 0
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 online now
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
Trades: 0
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
I like pie

Posts: 3,357
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I'm confused... are you saying that the "class" attribute is depreciated?? It certainly isn't...
__________________
Wayfarer | jQuery Tooltip | Mapbox: the jQuery Map
Latest Project: Houston Movers
If Google is the Coca-Cola of Web search, Bing is RC Cola
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
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
Trades: 0
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: 9,031
Location: Tennessee
Trades: 0
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 online now
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,632
Name: Stefan
Location: London, UK
Trades: 0
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
__________________
DoThatDesign.com - Professional Website Design - FREE Quotes!
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-21-2008, 02:52 PM Re: ID instead of NAME?
Truly's Avatar
Ultra Talker

Posts: 302
Trades: 0
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 online now
Reply With Quote
View Public Profile
 
Reply     « Reply to ID instead of NAME?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11929 seconds with 13 queries