Jump to content

Output Tags


the-kid3210

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...