Search code examples
htmlxmlxhtmlepublang

Should the <i>-tag contain a language attribute if used to mark up foreign language words?


Typographically, italic type is used, among other uses, to mark up foreign language text:

The Roman soldier pointed his pilum at me.

In the HTML/XHTML/XML code of an EPUB, should the <i>-Tag contain a language attribute? Here is a simplified example:

<html xml:lang="en">
...
    <p>The Roman soldier pointed
    his <i xml:lang="la">pilum</i>
    at me.</p>

Solution

  • From a link in the Sigil forums I actually found an explicit recommendation by the IDPF to mark up foreign passages in that way. The example they give contains the following code, where a French passage is marked up in containing English text:

    <i xml:lang="fr" lang="fr">C'est vendredi saint!</i>