How to markup scientific names in XHTML?

孤人 提交于 2019-12-06 07:28:36

问题


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.

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.

Edit: Would the <dfn> tag be appropiate?


回答1:


dfn is for a definition of something.

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

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>

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>

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.




回答2:


In (X)HTML5, the i element should be used:

[…] such as a taxonomic designation, a technical term, an idiomatic phrase or short span of transliterated prose from another language, a thought, or a ship name in Western texts.

I guess "taxonomic designation" matches your case.



来源:https://stackoverflow.com/questions/780444/how-to-markup-scientific-names-in-xhtml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!