PDA

View Full Version : A Case for the Deprecated <i> Tag



jstanley01
Apr 9th, 2007, 04:18 PM
I hate seeing the <i> tag about to be thrown out the window. I'm all in favor of separating content from formatting, but...

On my site I use scripture citations from the Authorized (a.k.a. King James) Version. And the AV uses itallics -- not for citations or for emphasis -- but to signal where the version, for the sake of a smooth English translation, departs from the Greek MSS (one good reason this almost 400-year-old version is still so useful). Neither the <em> nor <cite> tags accurately describe such content. So what's to do once <i> goes the way of the dodo bird?

Given the cultural importance of the AV, I'd vote for retaining the <i> tag just for its benefit. The W3C does let us vote, right?

Arbitrator
Apr 9th, 2007, 04:39 PM
What prevents you from using a span element with a descriptive class name?

jstanley01
Apr 9th, 2007, 07:34 PM
Nothing, except that HTML tags are supposed to signal content. And the AV's use of italics references content, not style. And there may be other examples out there where neither <em> or <cite> cover the content-specific uses of italics.

Arbitrator
Apr 9th, 2007, 09:10 PM
I don’t see how that would be a case for the i element. IMO, that element only signals a specific stylistic effect and should not be considered structural.

In your case, the italics indicate something through presentation. Could the same indications be made by changing the text color, underlining, font weight, small caps, spacial separation, or another stylistic effect? Could the meanings be directly clarified with content labels? If so, then the italics are merely presentational.

I think that your proposal should be something more like (for example) asking for a deviation element to show where deviations occurred between the two versions. Of course, you can’t have an element for everything; thus, the semantically neutral span and div elements with descriptive class and/or ID names are used where no appropriate element is available.

jstanley01
Apr 9th, 2007, 11:01 PM
You're right, of course, that "you can't have an element for everything." And preserving the <i> tag for what I'm talking about wouldn't make sense.

Some kind of deviation tag like you suggested might make sense (<dev>?), although I don't know if literature outside the AV uses italics for that purpose. I guess I was kind of fishing to see if there are other examples out there of italics being used for narrow and content-specific reasons other than <em> and <cite>.

According to my understanding, HTML is being groomed for more than just structure. For instance, using the <cite> tag for sources allows markup to be parsed for those sources. Some kind of <dev> tag, for the AV anyways, would allow the same kind of parsing. And while <cite> might be rationalized as structural, it seems to me it would take quite a stretch to put <em> in that category.

jstanley01
Apr 9th, 2007, 11:11 PM
BTW, who writes up the little bubbles that a:hover over the little squares under the screen names around this joint? The W3C? :P

Arbitrator
Apr 9th, 2007, 11:45 PM
As far as em being associated with a specific style, it is not; thus, I would consider it structural. You might imagine it being presentational since modern browsers choose to render its contents consistently as italics. However, there’s nothing in the spec preventing a vendor from rendering the contents, for example, with a dotted outline (visual) or in a louder tone (aural).

Most of the elements are associated with styles at some point anyway. There wouldn’t be much reason to, for example, use a div if they weren’t (then again, that element is associated with line‐breaks which are, arguably, stylistic). Tables are definitely presentational since you are explicitly associating content with vertical and horizontal layout. Of course, grammatical association of the same content might be totally impractical (imagine a ten thousand record table); we give in here and there when it comes to the separation mantra.


BTW, who writes up the little bubbles that a:hover over the little squares under the screen names around this joint? The W3C? :PIf you mean the tooltips of the green and red reputation markers, I would assume that the forum administrators define the messages. They might be using vBulletin defaults for the messages though. Your rating is based on people clicking the scale icon and possibly the warning sign icon. I’ve never used it, so I’m not sure how it works. I do know that you can see a record of who voted for you, the reason that they provided (if any), and the post that they voted from/for under the User Control Panel. You can’t see who cast the actual vote though unless they leave their name in the comment.

gsnedders
Apr 10th, 2007, 01:46 AM
<i> isn't deprecated, and as it is an element meant for the specific use of italics, use it instead of <span>. There are valid grammatical reasons for having text as italics.


The W3C does let us vote, right?
No, they don't, for HTML, voting is limited to the HTML WG.


Tables are definitely presentational since you are explicitly associating content with vertical and horizontal layout. Of course, grammatical association of the same content might be totally impractical (imagine a ten thousand record table); we give in here and there when it comes to the separation mantra.
Huh? Tables are another semantic construct. You can apply the same argument that a list is just presentational. Cells within a table can be related to headers (through the axis and headers attributes).

Nightfire
Apr 10th, 2007, 01:54 AM
<i> is depreciated. No idea where you read that it isn't. Italic text is a text style. If it is to emphasise (sp) a word, then that's where the <em> tag comes in.

gsnedders
Apr 10th, 2007, 01:57 AM
XHTML Presentation module, not deprecated: http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_presentationmodule

HTML 4.01, not deprecated: http://www.w3.org/TR/html4/present/graphics.html#edef-I

Where is it ever noted that it is deprecated?

jstanley01
Apr 10th, 2007, 02:59 AM
Arbitrator:

Hmm. You make some good points. Like I said, even <em> can be rationalized as structure. But most, if not all, the elements of HTML also have implied, if not explicit, expectations for content. Most <h1> tags are followed by text that "follows." Follow? And put an <h2> after an <h1> and in all likelihood its content is a subtopic of the <h1> -- that's, in fact, the expecation, violated at a web designer's peril.

Even paragraphs, as we learned in grammar school, should more-or-less deal with the same topic. (Remember the "topic sentence"? Yuk!). Of course, of the tags I'm familiar with, the most explicit as far as content is <cite>, which is supposed to be used for sources.

Heck, I've been sitting around thinking of all sorts of uses for the <dev> tag you suggested; :rolleyes: e.g. "The words <dev>up your nose with a rubber hose</dev> did not come from the President." Or how about using it for proofreading instead of the old <s> nonsense? Or arming scientists with it so they can snidely rebutt one another in peer reviews? Eh? :D

jstanley01
Apr 10th, 2007, 03:13 AM
Error 404:

Not deprecated? Oops. Nevermind. (I still like the <dev> tag idea.)

Arbitrator
Apr 10th, 2007, 06:47 AM
XHTML Presentation module, not deprecated: http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_presentationmodulePersonally, I think that all of the elements in that module should be deprecated.

Counter arguments that I hear are that the b, big, i, small elements are acceptable substitutes for the emphasis and strong emphasis elements. I disagree. The em and strong elements already serve the purpose. Of course, people complain that their documents are unstyled when CSS is disabled or that class names are too much effort to type.

Arguments I’ve heard for hr are null in light of the XHTML 2.0 (WD) section element. Basically, proponents describe things such as separation of chapters, again, with the arguments about how there should be style when CSS is disabled. The “horizontal” in horizontal rule implies presentation to me.

The arguments that I’ve heard for sub and sup can be worked around using Unicode characters (http://www.alanwood.net/unicode/superscripts_and_subscripts.html) and, I would assume, MathML and ChemML.

Regarding tt, I see no use for it. Well, maybe there is one use, but I’ll get to that.


There are valid grammatical reasons for having text as italics.I’d be interested in hearing of some examples unless they’re the same ones that I mentioned above.


No, they don't, for HTML, voting is limited to the HTML WG.According to Ian Hickson, “apparently anyone can actually join the W3C effort (http://blog.whatwg.org/w3c-restarts-html-effort).” I wonder whether this is actually true though or if, perhaps, there’s some missing context.


Huh? Tables are another semantic construct. You can apply the same argument that a list is just presentational. Cells within a table can be related to headers (through the axis and headers attributes).Obviously, tables have their semantic place. I’m not debating that. But, IMO, they have a very obvious presentation side. The table row (tr) and column (col) elements seem to be good examples of this; the first implies a horizontal layout while the second references vertical appearance. The way a table is built also implies a rigid visual structure. Of course, I’d also say that it would be crazy to abolish tables; there are too many use cases and they’re too convenient for data association. I don’t see substitutes for axis, headers, scope, colspan, or rowspan either (the last two strike me as very presentational btw).


But most, if not all, the elements of HTML also have implied, if not explicit, expectations for content.You can find presentation in every element if you look hard enough. Have to find some balance somewhere. For myself, I’ve drawn a line and certain elements, such all of those of the XHTML 1.1 Presentation Module, are not inside it.


Heck, I've been sitting around thinking of all sorts of uses for the <dev> tag you suggested; :rolleyes: e.g. "The words <dev>up your nose with a rubber hose</dev> did not come from the President." Or how about using it for proofreading instead of the old <s> nonsense? Or arming scientists with it so they can snidely rebutt one another in peer reviews? Eh? :DIf I had to make up an element (that’s not in XHTML 2.0), it would probably be something for character art. This would be a place where you could use Unicode characters outside of their proper meanings. The element could be used to mark up anything from smilies to ASCII art (http://en.wikipedia.org/wiki/ASCII_art) to text written in fonts that are gibberish or that have nothing to do with their Unicode mappings (e.g., Webdings). This might be the one use case that I can see for the tt element although the name would be wrong.

You can actually write your own language using XML (I’ve tried) although this won’t be possible for the Web (with the utility of HTML) until major browsers get with the program. There’s no way to duplicate the effects of the anchor, image, iframe, object, and (I presume) script elements without XLink support; the ID attribute without xml:id or DTD support; embedded style sheets without full xml-stylesheet support; or named character entities without DTD support (although UTF‐8 solves this, I guess). So far, I know of no ways to duplicate the title element. I suppose that you could cheat though and just use XSLT or the XHTML namespace for all of the missing elements; this is sort of what I’ve been experimenting with.

nexosis
Apr 10th, 2007, 07:03 AM
<i> is deprecated but can still be used in transitional.

gsnedders
Apr 10th, 2007, 10:34 AM
I’d be interested in hearing of some examples unless they’re the same ones that I mentioned above.
Italics show the name of the work:

There was a performance of Shakespeare's A Midsummer Night's Dream.
Foreign words:

I had a croque-monsieur for lunch today
Thoughts:

He can't hate me, he just can't, thought Andrew
In all of the above (and many, many more cases) the italics have semantic meaning.


According to Ian Hickson, “apparently anyone can actually join the W3C effort (http://blog.whatwg.org/w3c-restarts-html-effort).” I wonder whether this is actually true though or if, perhaps, there’s some missing context.
There are certain limitations, such as if you work for a member company and the AC won't nominate you, you cannot be a member of the WG. Not all the documents that you need to go through are publicly available, IIRC, and the details of what is within them cannot be disclosed. I will, however, say, the stricter parts are publicly available.


<i> is deprecated but can still be used in transitional.
Please cite your normative source. I've cited two specifications (XHTML Modularisation and HTML 4.01) where is both allowed in Strict and not deprecated.

croatiankid
Apr 10th, 2007, 01:49 PM
<i> is deprecated but can still be used in transitional.
No, it is not deprecated in html 4.01.

Arbitrator
Apr 10th, 2007, 08:12 PM
Italics show the name of the workThis is exactly what the cite element is for. You also can’t assume that every language uses italicization to mark up external works. In English, you can still use underlines or quotation marks too; thus, the manner that one chooses to indicate external works is stylistic and based upon author preferences. Some people would rather just mark them with capital letters at the beginning of each word and nothing more. I’d say that such titles lose nothing in the way of semantic meaning.


Foreign wordsThis is solved with the lang and xml:lang attributes. CSS has two selector types specifically meant for styling content based upon language. Class names can be used when those are not supported. You can’t assume italics here either. In Japanese, I see foreign words marked in Katakana or uppercase Latin letters (but not italics), for example. If I say “e.g.” without italicization, semantic meaning is not lost; you still may not know what language that it originates from or the meaning, but italicization does not solve that problem.


ThoughtsThat could just as easily be marked up with quotation marks, since “thought” is explicit. When I read, I, more frequently, see thoughts marked up as general sentences (instead of like dialogue); you can tell from context that these are thoughts going through the character’s mind. For example, a quote from Dragonseye: “Clisser knew when he wasn’t needed, and left the room, smiling to himself.” What’s going through his mind is implied.

nolvorite
Apr 10th, 2007, 09:02 PM
no it's not deprecated AFAIK.

Arbitrator
Apr 10th, 2007, 09:11 PM
I think everyone can stop pointing out whether or not it’s deprecated. Look at the official element list (http://www.w3.org/TR/html401/index/elements.html) for HTML 4.01, scroll down to the row for the i element, and note that it is not marked as deprecated in the fifth column from the left.

oracleguy
Apr 11th, 2007, 05:40 PM
You're right, of course, that "you can't have an element for everything." And preserving the <i> tag for what I'm talking about wouldn't make sense.

Some kind of deviation tag like you suggested might make sense (<dev>?), although I don't know if literature outside the AV uses italics for that purpose. I guess I was kind of fishing to see if there are other examples out there of italics being used for narrow and content-specific reasons other than <em> and <cite>.

If you are doing something special enough that you really want to have a bunch of your own tags, you could just switch your pages over to XML. However I don't think that is necessary in this case, the solutions previously mentioned are more than adequate.

croatiankid
Apr 11th, 2007, 06:26 PM
I would just mark it up (for your use) <cite>whatever you want cited</cite>, and using CSS style cite to {font-style: italic}

Arbitrator
Apr 11th, 2007, 07:26 PM
I would just mark it up (for your use) <cite>whatever you want cited</cite>, and using CSS style cite to {font-style: italic}According to what I’ve read, cite wouldn’t be appropriate for the OP’s case. He wants an element to mark up a deviation from an external work rather than to cite the name of the work itself.

So far as I can tell, the cite element is only used to mark up other sources; for example: book, magazine, article, audio, and video titles. It might also be appropriate to mark up someone’s name for a quote too; the semantics are too vague for me to be sure though.

gsnedders
Apr 11th, 2007, 08:33 PM
Under WA1.0, the i element is defined as:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.
Note the last clause, which clearly shows that <i> is not a presentational element, as presenting it as italicised is typical, though not definite.

Also, HTML 4.01 gives absolutely no normative meaning to <i>, neither semantic nor presentational. It informatively says that is should be rendered italicised.

Arbitrator
Apr 11th, 2007, 09:43 PM
Under WA1.0, the i element is defined as:

Note the last clause, which clearly shows that <i> is not a presentational element, as presenting it as italicised is typical, though not definite.Can’t say that I’ve ever given much weight to the WAI. The specification itself doesn’t even meet the requirements for Priority 1 of its own guidelines. If you need an example, take Priority 1 Guideline 5.2 and note that the very table used to present the guidelines fails to adhere. That same document also uses at least one element contrary to its semantic meaning. Of course, authors do make mistakes, but you would expect that an authoritative document on accessibility would adhere to its own guidelines.

I do not interpret the quote as “clearly” demonstrating the point that you’re trying to make. The quote itself has the word “presentation” in it and seems to be indicating that one should adhere to stylistic norms (in a way that I disagree with). Except for the language thing, I don’t even think that they are stylistic norms and, as I mentioned before, that particular issue is already solved too. Noting an example proffered by the quote, I can’t see why something like “U.S.S Constitution” is any semantically different from/ambiguous compared to “U.S.S. Constitution”; even without the “U.S.S.”, context would almost certainly tell you that you’re dealing with a ship designation.


Also, HTML 4.01 gives absolutely no normative meaning to <i>, neither semantic nor presentational. It informatively says that is should be rendered italicised.I think that the XHTML module name is normative enough. Even if it weren’t, I would still avoid all of the elements in that module (and the br element, which, IMO, should have been included in that module instead of in Text). I might exclude bdo and pre too.

Of course, you can do whatever if you believe it to be semantic; it is still allowed under the Strict DTD, so there’s no technical reason not to use it or those other elements.

gsnedders
Apr 11th, 2007, 10:03 PM
WAI? I said WA1.0, a completely unrelated specification.

Arbitrator
Apr 11th, 2007, 10:25 PM
WAI? I said WA1.0, a completely unrelated specification.Sorry, my mistake.

You mention the so‐called HTML5 (Web Applications 1.0) (WD), I take it. Currently, I wouldn’t call it authoritative and would still disagree with the quote as far as the current element is concerned.

I think that what they are doing is trying to make prevalent bad practice into normatively good practice while maintaining backward‐compatibility. IMO, they’ve sacrificed strict semantics in the name of compatibility, which seems to be the primary aim of the document. The XHTML 2.0 WD abolished that element altogether in the name of strict semantics (although even they have been forced to make concessions (e.g., the image, numbered header, and separator elements were added despite being redundant or stylistic).)