Jump to content

Output Tags


the-kid3210
 Share

Recommended Posts

I always wanted to know what were the atual functions for the Output tags...I know about the <pre> tag being something that shows text before it was edited but what is the actual function for the <var>, <samp>, <kbd>, <tt> and <code> tags are for? are they just for display or do they have another purpose?

Link to comment
Share on other sites

pretty much for styling. they really aren't used for much else. AFAIKAnd they help with 'semantics'. You can have all of your 'code' identified within <bold> tags for styling, but it would be semantically correct to use 'code' tags and style the tag as 'font-weight: 700'. Then, there is a better separation of style and content. And the style for the 'code' is more easily altered by simply changing the style for the code tag rather than having to sort through the page to find the occurences. It is sort of like a pre-defined 'class'.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...