Re: Introduce <term> element

nene@triin.net schreef:
> +1
>
> <term> looks nice and seems to fill many uses of <i> and <b>, although
> using it to mark up text in foreign languages might not always be
> appropriate.
>
> For example sometimes instead of phrase or word, there
> is a whole bunch of paragraphs in foreign text, that you would like to
> be in italic e.g. the long passages of french at the beginning of
> "War and Peace". That kind of long passages are probably better served
> with just <span lang="foo"> as setting them in italic or roman typeface
> is largely matter of taste, not well-established convention.
>   

I think foreign terms are in essence the same as technical terms, and 
therefore can be used with the same <term> markup. Of course, in the 
case of a foreign term, having a lang attribute as well is preferred.

> Another place where italics is often used is when the author wants to
> express the direct thoughts of a person, in contrast to the direct
> speach. For example:
>
>     <i>This might even work,</i> thought John and said,
>     "That's never going to happen!"
>
> Just some things to think about.

Yes, I also identified that as a separate thing from the WHATWG’s 
description and examples for <i> and <b>, but it does not fall within 
the definition of <term>. The WHATWG’s spec refers to it as to indicate 
‘mood’ or a ‘dream scene’. I think for that, there either needs to be 
another new element (as generic as possible), or maybe it can fit within 
the definition of <q>. After all, if you have a conversation like so, 
you would use <q>:

<q>This might even work,</q> said John, <q>but that’s never going to 
happen!</q>

The only difference with ‘thought’ is that he doesn’t say it out loud, 
but it’s kind of the same thing. Maybe the distinction is something you 
would rather make with either a class attribute or a new optional attribute.

Well anyway, I’m not entirely sure yet about what would be appropriate 
in that case yet.

> Using CSS you could hide the definition and show it when a user's 
> cursor rolls over the term, you could provide definitions as footnotes 
> in print friendly forms, and presumably search engines and the like 
> could make use of it.

Yes, definitions could be either in a <dl> (Definition List) somewhere 
else in the document, or be found near the <dfn> for that term, which 
marks up the defining instance (also used by a generated index).

I’m not sure yet whether there should be some kind of automatic link 
based on matching a term inside a <term> to either a <dfn> or a <dt>, or 
there should be some explicit linking method using the <a> and/or the 
‘href’ attribute. I’m leaning to the latter, because although the former 
would be convenient, I don’t think you can assume that they are always 
written in the exact same manner (internationalisation consideration). 
Also, it would be good if people were encouraged to have IDs on every 
<dfn> element for easy reference by both links outside the document as 
well as terms inside the document.

So, a fuller example would be:

The phrase <dfn lang="fr" id="jenesaisquois">je ne sais quoi</dfn> is 
used to say, literally, ‘I don't know what’.
She has a certain… <term lang="fr"><a href="#jenesaisquoi">je ne sais 
quoi</a></term>…

Or,

She has a certain… <term lang="fr"><a 
href="http://www.answers.com/je%20ne%20sais%20quoi">je ne sais 
quoi</a></term>…

Or, a little more radical idea:

She has a certain… <term lang="fr" href="#jenesaisquoi">je ne sais 
quoi</term>…

Please take the latter with a grain of salt; my purpose here is to 
discuss the <term> element, and not per se whether href should be 
allowed on elements other than <a> and <link> (although I do see it 
making sense here, as the hyper-reference is directly related to the term).

Anyway, to summarise two main benefits of having a <term> element, other 
than just for semantics (which I don’t think by itself is enough to 
justify an element):

1. Visual presentation; foreign/technical terms are often shown in 
italics. Precise typology differs, sometimes only the defining instance 
is italicised (this is covered by HTML4), but often also all instances 
of terms are italicised, and sometimes all instances are italicised and 
the defining instance is in bold.

2. Cross-referencing; using this term it is much easier to reliably 
create cross-references to term definitions. This is especially done 
frequently in specifications and other technical documents. Because the 
terms are marked up explicitly, the method to create cross-references 
doesn’t have to perform a full-text search for the terms, and then hope 
it works reliably and none of the terms resemble English words.

Further thoughts:

The WHATWG spec redefines <dl> to be more generic than HTML4. I’m not at 
all sure whether this is a good idea.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Thursday, 5 April 2007 04:23:45 UTC