Reputation: 605
I have some content which is written completely in a non-English (Turkish) language. (So, I have <html lang="tr">
on the top.) Within the text, I am using some terms in that language. I want to add some "semi-visual" content for such a term that will give its English equivalent (using the title
attribute probably), in case the reader wants to know the exact English equivalent of the term (probably by moving their mouse pointer over the term).
The <dfn>
tag is not appropriate for this purpose, because most of the times I will not be defining the term in its ancestor element; I will be just using it. A simple alternative would be to enclose the term within a <span>
element with a title
attribute containing the English equivalent of the term. For example,
bla bla bla <span title="format">biçim</span> bla bla bla...
Here "format
" is the English equivalent of the non-English term "biçim
".
Please note that, in most of the cases, I will not want the term to be rendered differently than the text around it.
What is the best HTML5 markup to implement such a semantic need?
Upvotes: 0
Views: 276
Reputation: 14123
Provide a separate dictionary (probably after the main text) as a DL
/DT
/DD
list and refer to corresponding DT
/DD
pairs from the main text. If popups are needed, they can be implemented on top of the same static semantic markup. SPAN
is 100% semantics-less generic element, I wouldn’t use it in this context.
Upvotes: 2