如何在 XHTML 中标记科学名称? [英] How to markup scientific names in XHTML?

查看:32
本文介绍了如何在 XHTML 中标记科学名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在 XHTML 中标记科学名称的最佳方法.这个答案 说我应该使用 <i> 元素,我不太赞成,当然,除非它是正确的要使用的元素.

I would like to know the best way to markup scientific names in XHTML. This answer says I should use the <i> element, which I'm not too in favour of, unless of course, it is the right element to use.

我可以使用 <span class="scientific">,但是看到 HTML 的第一个用途是标记科学文档,我想会有一个更好的语义钩子.

I could use <span class="scientific">, but seeing as one of the first uses of HTML was to markup scientific documents, I'd imagine there'd be a better semantic hook for this sort of thing.

另外,是否有任何元素可以标记学名的通用名称?

Also, is there any element to markup the common name of a scientific name?

注意:它看起来像维基百科,或者至少这篇文章正在使用 用于科学名称.

Note: It looks like Wikipedia, or at lease this article is using <i> for scientific nams.

编辑: 标签是否合适?

推荐答案

dfn 用于定义某事物.

<p>The prefix cardio- means <dfn>of the heart</dfn>.</p>

就我在 HTML 4 元素列表中所见没有什么特别符合要求的.这让您有几个选择:

As far as I can see in the list of HTML 4 elements nothing specifically fits the bill. This leaves you with a few options:

<span class="scientific">cardio</span>

语义是由类添加的,所以这可能是最正确的方法,技术上.但是,它确实有一个缺点,那就是如果没有您的 CSS,它与周围的文本不会有任何不同.另一种选择可能是:/me 准备躲避掩护

The semantics are added by the class, and so this is probably the most correct way, technically. However, it does have the downside that without your CSS, it won't appear different in any way to the surrounding text. Another option might be this: /me prepares to duck for cover

<i class="scientific">cardio</i>

现在,在我因使用禁止元素 而感到头疼之前,请考虑它的描述性不亚于使用 ,即使缺少样式表,您仍然会模糊地获得正确的格式.只需确保添加 class 属性即可.

Now before I get my head bitten off for using the verboten element, <i>, consider that it is no less descriptive than using <span>, and even if a stylesheet were missing, you'd still get vaguely the correct formatting. Just make sure you add the class attribute.

这篇关于如何在 XHTML 中标记科学名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆