Crossing out words in hypertext
October 11, 2004 7:26 PM   Subscribe

How do you cross out words in Hypertext?
posted by semmi to Computers & Internet (30 answers total)
 
You can use the <strike></strike> tag, but it's been deprecated in recent versions of HTML so don't be surprised to see it stop working.
posted by Dipsomaniac at 7:29 PM on October 11, 2004


Better yet, you can use the <del> tag, which is supposed to indicate deleted text; the ins tag indicates inserted text
posted by adamrice at 7:32 PM on October 11, 2004


<span style="text-decoration:line-through;">Text</span>
posted by tenseone at 7:41 PM on October 11, 2004


Or, I suppose:

span.strike {text-decoration:line-through;}
...
<span class="strike">Text</span>
posted by tenseone at 7:46 PM on October 11, 2004


Or, even more clever:

em.strike {
font-style:normal;
text-decoration:line-through;
}
...
<em class="strike">Text</em>

(Less typing.)
posted by tenseone at 7:51 PM on October 11, 2004


And not to sound too snarky, but it's HTML, not hypertext.
posted by mrgavins at 7:57 PM on October 11, 2004


Not to be too snarky, but that first H in HTML stands for hypertext.
posted by b1tr0t at 8:11 PM on October 11, 2004


s and /s, in brackets

like this
posted by amberglow at 8:11 PM on October 11, 2004


Not to be too snarky, but that first H in HTML stands for hyper.
posted by Kwantsar at 8:13 PM on October 11, 2004


I don't mean to be overly snarky, but it's the HT that stands for hypertext, not just the H.
posted by brownpau at 8:15 PM on October 11, 2004


Not to be even more snarky than everyone else participating, but the 'x' in xhtml represents 'extensible'--not 'xtreme'.
posted by tenseone at 8:19 PM on October 11, 2004


I always thought ithose two letters were for Klinger: Holy Toledo!
posted by billsaysthis at 8:19 PM on October 11, 2004


did my strikethru show up in my post? (i'm never actually sure everyone sees it)
posted by amberglow at 8:20 PM on October 11, 2004


How do you display those hypertags in comments?
posted by swift at 8:21 PM on October 11, 2004


(amberglow: yes)
posted by swift at 8:21 PM on October 11, 2004


Only use del.
posted by joeclark at 8:23 PM on October 11, 2004


why? if s and /s works? (it's simpler)

thanks swift
posted by amberglow at 8:25 PM on October 11, 2004


And honestly, all snarkyness aside, just because one term contains another does not mean that they are the same.
posted by mrgavins at 8:37 PM on October 11, 2004


why? if s and /s works? (it's simpler)

Primarily because there is no such tag in HTML. At least, the earliest version of HTML I can use with BBEdit's syntax checker (HTML 3.2) rejects it.
posted by kindall at 8:45 PM on October 11, 2004


i don't get it. why does it work then? is it a more recent code?

what about i and /i for italics?
posted by amberglow at 9:01 PM on October 11, 2004


Deprecated elements *may* be removed from future HTML revisions, however, if you properly specify your document's DOCTYPE, any browser that's worth it's salt should continue to render it properly.
posted by shepd at 9:45 PM on October 11, 2004


Also, crossing things out intentionally is a sign of laziness, since sarcasm--well written--is pretty obvious anyway, which is all this tired convention is about.
posted by interrobang at 10:06 PM on October 11, 2004


Oh c'mon, there are a lot of legitimate uses. Making corrections to blog entries without erasing the past, for one.
posted by lbergstr at 10:18 PM on October 11, 2004


"^H" is what all the cool^H^H^H^H geeky people use.
posted by ALongDecember at 10:25 PM on October 11, 2004


what about i and /i for italics?

HTML Techniques for Web Content Accessibility Guidelines 1.0, Emphasis:
The proper HTML elements should be used to mark up emphasis: EM and STRONG. The B and I elements should not be used; they are used to create a visual presentation effect. The EM and STRONG elements were designed to indicate structural emphasis that may be rendered in a variety of ways (font style changes, speech inflection changes, etc.)
This page has a nice explanation of structural tags vs. presentational tags.
posted by kirkaracha at 10:28 PM on October 11, 2004


To clarify what everyone else said: adhering to standards is important because a standards-compliant web is one that can be viewed in many different ways (the traditional browser being only the tip of the iceburg). This is starting to happen already (crawlers, custom stylesheets, etc.) but there's much more to come.
posted by Tlogmer at 11:05 PM on October 11, 2004


Not to be too snarky, but couldn't a cursory googling have found the answer to this question?
posted by stavrosthewonderchicken at 2:41 AM on October 12, 2004


i don't get it. why does it work then?

Why does BLINK work in some browsers even though it's not part of HTML? Because browser developers can't resist adding their own little special features, that's why.

That said, while you should use only HTML tags in your HTML documents, the idea that you should use EM and STRONG in place of B and I is just silly. Any writer knows you don't tell the computer to "emphazise" something and then let some computer programmer you've never met decide how it should be emphasized. If you want italics, you want italics; you don't want something that "most" browsers "traditionally" render as italics. The look, and thus the feel, of a passage of text can be totally transformed by substituting bold where the writer intended italics.

You could force EM to render as italics via stylesheet, but that would be dumb because 1) then you are only guaranteed to get italics in browsers that support stylesheets and 2) when working with the code, you have to go look at the stylesheet to find out how EM will be rendered in the document, instead of it being obvious. Also 3) it's a lot more typing and more bytes and provides no benefit whatsoever. EM and STRONG aren't "presentational" anyway -- they say about as little as B and I about why something is marked up that way.

If you want to force boldface or italics, B and I are perfectly fine ways of doing it, and they're part of HTML. Even though they may be "deprecated" in XHTML 2.0 they will never actually be removed, because so many pages use them, and even if they were, you could continue to use them by providing an appropriate DOCTYPE since browsers will need to continue to render older versions of HTML.
posted by kindall at 9:17 AM on October 12, 2004


EM and STRONG aren't "presentational" anyway

I mean they're not "structural."
posted by kindall at 9:18 AM on October 12, 2004


thanks, but no, thanks.
posted by semmi at 10:22 AM on October 12, 2004


« Older Titanium Necklace   |   Breaking into the composing-music-for-soundtracks... Newer »
This thread is closed to new comments.