Last modified: 2013-10-06 16:30:22 UTC
...and should be replaced by <del> tags. All the UAs I've checked render this is struck-through text, although the w3c spec does not require this - so it could be enforced with CSS.
They're still legal, no reason to change them. If at some point we transition to XHTML 1.0 Strict or some other version without those elements, then of course we could output a different element type conforming with those specs.
Indeed, but it's better not to use deprecated tags. Surely it's fairly simple to implement?
Not better; just more complicated with no benefit. The idea of deprecating <s> isn't to blindly replace them all with <span style="font-decoration: strikethrough">; it's to plan to use semantically appropriate elements or classes when you write new documents. If we *had* to perform such blind replacement, such as for outputting a future version of HTML that doesn't support <s>, we could do so. But doing so with XHTML 1.1 Transitional doesn't make any sense. It doesn't make the code semantically better. It doesn't make it more compatible. It doesn't make it more meaningful. It doesn't do anything but complicate the code and increase the size of output.
*** Bug 7924 has been marked as a duplicate of this bug. ***
HTML 5 appears to have obsoleted <strike> but *not* <s>: http://dev.w3.org/html5/spec/obsolete.html#non-conforming-features Judging by the spec actually, <s> sounds more right than <del> for most usages other than document addition/removal markup: http://dev.w3.org/html5/spec/text-level-semantics.html#the-s-element http://dev.w3.org/html5/spec/edits.html#the-del-element I don't see any active use of <strike> in MediaWiki or any of our SVN extensions; it's allowed through the HTML sanitizer, and that would be the place to normalize it to <s> if necessary in future. Retooling this to an enh request to normalize <strike> to <s>.
Brion Vibber wrote: > Retooling this to an enh request to normalize <strike> to <s>. That sounds entirely reasonable, and it really can be done any time, because <strike> and <s> ARE semantically identical. FWIW, I tend to agree with others that replacing both with CSS that amounts to <span style="font-decoration: strikethrough;"> actually IS perfectly fine, from a code properness point of view (the two elements don't mean anything semantic, only presentational, i.e. "this is struck-through text", which is precisely what the CSS version means), but I also agree with the counterpoint that it doesn't really buy us anything and make the code longer. No reason to do that if HTML5 will still support <s> as non-deprecated markup. And I concur that they are not interchangeable with <del>. Many editors on Wikipedia use them all as if they were, but this is a mistake.
Note that this kind of normalization can also break stuff, such as CSS rules set for 'strike' (both in core as well as extensions and site/user scripts).
Technically HTML5 actually defines <s> as "The s element represents contents that are no longer accurate or no longer relevant." rather than as a strike-through. But that probably doesn't really matter since HTML4 defined both <strike> and <s> as strike-through. So whether you used <strike> or <s> HTML5 still changes the semantics.