Sniper Elite 4 review: Headshotting Nazis has never felt so good
When a common tag> or attribute is no longer "supported" under XHTML what is one supposed to use in its place?
A few examples of some common usages which are no longer supported under XHTML.
1. The a> tag no longer supports the attribute "target=". So when a user clicks on a link how is one supposed to control the behavior of the Window where the link will open?
2. The img> tag no longer supports the attributes "border=" and "name". Why not?
3. The script> tag no longer supports the attribute "language=". I cannot find an alternative. So how are you supposed to specify which scripting language is being used?
4. The table> tag no longer supports the attribute "height=". All the other attributes are supported e.g. width, border, cellpadding, cellspacing etc... but not height... what is the problem with height?
5. The tag embed> is not supported. What tag must be used to "embed" Flash into a page? The
code that I use has always been embed src="name_of_flash.swf" quality="high"
pluginspage="click here" type="application/x-shockwave-flash"
I fully support the need for standards and try to write strict code whenever I can. But this
does not make the job any easier.
Am I missing something here?
Your examples (with the sole exception of 2b "name") aren't supported in HTML 4.01 Strict either and will not validate if you use that Doctype!
To get them to validate you have to use the HTML 4.01 Transitional Doctype (except table height which won't validate even in that).
You can also validate most of them (except img name and table height) XHTML Transitional .
1. Is not supposed to be used for accessibility reasons.
2a. Border is supposed to go into your CSS because it is presentation not content.
2b. You are supposed to use "id" rather than "name" (but you have to use "name" as well if you want to support older browsers).
4. Height, is not an attribute of table in HTML 4.01 either, it won't validate even in HTML 4.01 Transitional.
5. embed was deprecated in HTML 4 in favour if object.
If you hunt around on the W3C pages you will probably find the justification for each of their decisions!
PurplePenny - thanks for taking the time for a detailed explanation.
OK. Time to change old habits then :)
Either they accept the reasoning behind the Strict doctype, in which case they shouldn't be trying to circumvent it using scripting, or they don't fully accept it; in which case they should use the Transitional Doctype.
Personally I think that the reasoning behind (non-use of) target is flawed. The accessibility guidelines say that until user agents can prevent new windows being spawned we shouldn't open new windows.
So if user agents finally catch up with accessibility and allow users to override the author's window opening behaviour (which to a certain extent Firefox already does) there will be no accessibility bar to opening new windows.
If there is no longer a valid reason to *not* open new windows why deprecate the facility to do so?
Also on a personal note I hate it when I'm on a site that rigidly sticks to the "no new windows" rule. I find it much easier to remember where I am if external links open in new windows. I try to remember to use "open in new tab" but quite often I just go ahead and click without thinking then close the tab only to realise that I've just lost the original site.
The target attribute (or lack of) is something that I have an issue with too and therefore chose the transitional route, using java may cause further problems with browsers not java enabled (they are out there)
The thinking behind no new windows seems to be that many novice surfers don’t realize that they have opened a new window and then get confuses when the back button doesn’t work!? I don’t know as when I first used the web it didn’t fox me for long.
Other opinion seems to be that strict is the way forward and that the other doctypes will be phased out eventually.
As a “I do if for fun” wed designer and I use the term designer lightly, a fair portion of the technical side is way over my head.
I think though that some things are difficult to achieve well using strict and CSS. Although I do like CSS very much.
This thread is now locked and can not be replied to.