Jump to content
  • Advertisement
Sign in to follow this  
namingway

[web] HTML help

This topic is 4495 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I don't quite understand what the following do; <code>Computer code</code> <kbd>Keyboard input</kbd> Teletype text <samp>Sample text</samp> <var>Computer variable</var> I'm guessing there self explanitory but I still don't get how they can be used.

Share this post


Link to post
Share on other sites
Advertisement
They indicate that the text enclosed in them represents computer code, keyboard input, teletype text, sample text, or a variable (respectively). Many computer books will use different typographical styles for those types of text, and they'll tell you about them towards the beginning. They exist in HTML to preserve semantics for screenreaders and other software (that wouldn't know that something enclosed in <font face="Courier"> is a code example), and so that those types of text have consistent styling (which you can specify with CSS).

Share this post


Link to post
Share on other sites
Adding to Igni's response, see http://www.w3.org/TR/html401/struct/text.html#h-9.2.1 for details.

For example, you can have a CSS style such as ...

kbd { background-color: silver; border-style: outset; }

... so that each <kbd> element is displayed looking like a keyboard button.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!