Peter -

The <code> tag is HTML 4, and represents 'computer code'- http://htmlhelp.com/reference/html40/phrase/code.html

Quote:
"
The *CODE* element denotes /computer code/. Visual browsers typically render *CODE* as monospaced text, but authors can suggest a rendering using style sheets <http://htmlhelp.com/reference/css/>. Since *CODE* is a structural element, it carries /meaning/, making it preferable to font style elements such as *TT <http://htmlhelp.com/reference/html40/fontstyle/tt.html>* when marking up computer code.


Since spacing is often important when presenting computer code, the *PRE <http://htmlhelp.com/reference/html40/block/pre.html>* element can be useful as a container for *CODE* elements. When used within other containers, a *CODE* element has multiple spaces collapsed. The following example uses *CODE* within *PRE*:
"




It does carry meaning, but not the one you are after. If you are marking up a phrase that is of class "filename" (like a phrase that is of class "question", "verb" or "sarcasm") then you may be better off going for <span class="filename">readme</span>, then style that class.

Cheers
James


Peter A. Shevtsov wrote:

Hello, List!

I'm writing the computer document (some kind of spec), where file names are mentioned from time to time. So my question is what tag should I use for file names?
Now I use something like that: <code>readme.txt</code>, but I think tha's not semanticaly correct...


What's your oppinion?

Thanks!

--
Peter A. Shevtsov

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************




Reply via email to