html – 我应该将哪一个元素用于短语外语单词?

html – 我应该将哪一个元素用于短语外语单词?,第1张

概述我想知道我应该在一个句子或段落中使用哪个html元素(比如说< p>块)用于借用的单词或外语中的单词,指的是有效的语义.这里举几个例子: 用英语讲 Tonight, I have a rendez-vous with a cute girl. (use of a French word) He was not speaking loudly, but not more silently, inde 我想知道我应该在一个句子或段落中使用哪个HTML元素(比如说< p>块)用于借用的单词或外语中的单词,指的是有效的语义.这里举几个例子:

用英语讲

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 =“借来的”>
>这些组合
>另一个标签

解决方法 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>
总结

以上是内存溢出为你收集整理的html – 我应该将哪一个元素用于短语外语单词?全部内容,希望文章能够帮你解决html – 我应该将哪一个元素用于短语外语单词?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/web/1049688.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存