[thelist] "Strikeout" text in HTML?

James Aylard webmaster at equilon-mrc.com
Wed Apr 25 14:51:01 CDT 2001


Joe,

> I'm using <strike> on http://artlung.com/ right now and it validates to
> 4.01 transitional.

    <s> and <strike> are deprecated in HTML 4.x, so they won't validate
under a strict dtd, but they will under a transitional dtd.

> How backwards-compatible are those others? I've been using <strike>
> since Netscape 2 -- out of habit -- but I'm open to these others if the
> support is good.

    Well, according to the Netscape docs, support for <s> and <strike> was
added with Netscape 3. Microsoft's docs show these elements were implemented
for IE 3. The <del> element will only work on IE 4+ and Netscape 6.x.
    It seems that <strike> could have been interpreted as "stricken" and
left in place, although <del> (as well as its opposite <ins>) does add
functionality that <strike> never had, and that is probably the reason for
the change.
    So, using <strike> along with a transitional dtd seems the most
universal approach, allowing you to apply CSS to the <strike> element if you
want to style it further.

James





More information about the thelist mailing list