[wp-docs] <tt> v. <code>

Justin Ryan justin at justin-ryan.com
Wed Oct 12 07:57:17 UTC 2011


Hello -

Is there is a firm convention for using <tt> tags or <code> tags?
Unfortunately, the documentation contradicts itself, leaving me confuzzled:

"To style code within the text of an article, such as listing
the index.php template file, use the <tt> tag to wrap the code within a
sentence. <code> tags also work, but in the past they used an annoying blue
background. Stick with <tt> to be safe." (
http://codex.wordpress.org/Codex:Styles#Using_Codes_in_the_Codex)

"There are two HTML tags which will turn text into monospaced type. They
are <code> and <tt>. The latter is rarely used today, replaced by the more
useful and semantically correct <code>, which distinguishes text that is
computer code from normal language." (
http://codex.wordpress.org/Writing_Code_in_Your_Posts#Code_Within_Paragraphs
)

Any guidance would be much appreciated.

Yours,
« JR »

*Justin Ryan*
Writer/Editor
Office: 713.581.4335
www.justin-ryan.com

*Linux Journal*
Contributing Editor
justin at linuxjournal.com
www.linuxjournal.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.automattic.com/pipermail/wp-docs/attachments/20111012/5dbac4cd/attachment.htm>


More information about the wp-docs mailing list