Forum Moderators: open

Message Too Old, No Replies

name attributes, xhtml 1.1 and backward compatibility

         

sc112

6:46 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



This is my first post. I found this site only recently. It's such an amazing source of info.

My websites validate as XHTML 1.0 Transitional. The only thing that prevents them from validating as XHTML 1.0 Strict is the name attribute in <img> for image rollovers. I use both id and name in <img>. Is it advisable to remove name in respect to backward compatibility? Is it worth going to XHTML 1.1?

Also, where can I find codes for other languages, i.e. what else are there besides 'en'?

Thanks.

tedster

7:19 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, sc112.

I'll tackle the language question for you. Because you asked in the context of a DTD dicussion, I assume you are pointing to the "en" in the declaration itself. No matter what language is used for the content of a web page, currently all the DTD's are "en".

If you want to declare a different language for the content itself (as opposed to the DTD) that can be handled with the lang attribute in the <html> tag - i.e <html lang="de">

The W3C has a full listg of the 2 and 3 letter langauge codes:
[w3.org...]

tedster

12:22 am on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found a good thread from last year about some of questions that xhtml migration brings up - well worth the read:

[webmasterworld.com...]

Especially note the question of what mime type to be serving and IE challenges there.

encyclo

5:51 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it advisable to remove name in respect to backward compatibility?

My rule of thimb is that you should never sacrifice functionality for validity. If you require the

name
attribute, then you should use a transitional doctype. I think you're actually talking about forward compatibility: I wouldn't be too concerned - legacy HTML atributes aren't going anywhere soon, and in fact it is unlikely that they will be removed from future browsers for the forseeable future. In the worst case scenario the image rollovers would cease working in 20 years time, which wouldn't be a calamity. In terms of backwards compatibility,
name[code] is better supported than [code]id
.

Is it worth going to XHTML 1.1?

No, it's not a good idea. XHTML 1.1 is not a newer version of 1.0, despite the name: it is a subset of XHTML for use as a module to be combined with other markup languages. It is a mistake to use it as an XHTML 1.0 replacement. I would also recommend not using mime-type switching as detailed in the above thread suggested by tedster, but that's another debate. ;)

sc112

4:05 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



Thanks for your replies. Very informative. I now have a clearer idea of the big picture.

I checked out the old thread so kindly provided by Tedster, and followed all the links. A lot of catching up to do!