tags:

views:

74

answers:

1

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?

+5  A: 

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.

nickf
Good answer, Nick. Hopefully you don't incur any downvotes from people who see <i> and go urgh! I think I'll go with <i> as it is used by Wikipedia and it seems to fit the bill. Thanks for the answer.
alex
oh, Wikipedia doesn't use any semantics at all in its markup, so I wouldn't use it as a guide. Click Edit on any page and you'll see why. Rather than get their users to learn the correct classes to use, etc, they go for a very simple markup... one step back from WYSIWYG, really.
nickf
Yeh, and I bet they don't use <ins> or <del> with their revisions?
alex
haha oh man, that'd be so messy.
nickf
Nick, according to http://htmlhelp.com/reference/html40/deprecated.html it hasn't been deprecated, just has lost it's presentational meaning... it does not mean italicize text anymore...
alex
it's also listed here: http://www.w3.org/TR/html401/index/elements.html
alex
oh, well there you go!
nickf
It's interesting... most people (including me until recently) though <b> and <i> were deprecated.
alex
Your example is wrong. http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-dfn-elementIt should be <p>The prefix <dfn>cardio-</dfn> means of the heart.</p>
porneL
oh that's... well... different to what I had expected. Looks like dfn might actually be the right way to do it!
nickf