August 27, 2006

Uncommon XHTML Tags, Part 4

I always see the <code> tag in a non-HTML form for various forums and bulletin boards, but rarely see the HTML tag used on a website.

Of course the point of <code> in HTML is to give meaning to the content within the tag. In this case, I am guessing it is used for complete computer code, as the <samp> tag is for sample computer code. Both come up with an appearance by default of smaller text type to fit as much code as possible on one screen. Other tags somewhat related to <code> are <kbd> (keyboard text), <var> (variable), <cite> (citation), and one I'll be going over at a later post: <dfn> (definition term).


<?php
echo "This is using the code tag.";
?>
Post a Comment