css - 对于简短的外语单词组,我应该使用哪个元素?

标签 css html semantic-markup

我想知道我应该在句子或段落中使用哪个 html 元素(比如 <p> block )对于借来的单词或外语单词 strong>,指的是一个有效的语义。这里有几个例子:

英文

Tonight, I have a rendez-vous with a cute girl. (use of a French word)

He was not speaking loudly, but not more silently, indeed mezzo voce (use of an Italian word)

法语

Java n'est pas popriétaire, a contrario de .Net

在法语中,至少,这种外语的使用需要斜体格式。

所以我想结合语义和表示。 Wikipedia article on Semantic HTML给我一个提示,但到目前为止我还不相信。此外,我可能无法控制 CSS,例如在文档 (wiki) 或描述文件 (pom) 中 哪个元素最适合我的要求:

  • <i> (当然不是 :) )
  • <em> (也许不是 :) )
  • <cite>
  • <span lang="latin">
  • <span class="borrowed">
  • 这些的组合
  • 另一个标签

最佳答案

W3C

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.

我的重点

他们的榜样

 <p>There is a certain <i lang="fr">je ne sais quoi</i> in the air.</p>

关于css - 对于简短的外语单词组,我应该使用哪个元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30322839/

相关文章:

html - 缩小时布局困惑

css - React Styled Component 组件之间的空间

javascript - 使悬停时的图像变暗 - twitter bootstrap 3.0

php - 在选择选项中显示周数

html - 多个h1标签?

javascript - 根据所选菜单项更改菜单侧边栏 - Semantic UI & JQuery

css - 在 bootstrap 3 中重新排序行

CSS 复选框图像不起作用

javascript - 如何让一个盒子粘在上面?

html - <="idx"的标签> vs <="namex"的标签>