• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

Is sup depreciated?

I was wondering in XHTML <sup></sup> depreciated?
0
stargateatlantis
Asked:
stargateatlantis
  • 2
3 Solutions
 
Tony O'ByrneSenior Web DeveloperCommented:
In the company (of web developers) where I work there was a recent e-mail discussion about the use of <sup>.

The consensus was that the the <sup> tags shouldn't be used because there's better ways to do it.  What route you take instead of <sup> depends on what it is you're doing.

If you want to do a trademark, copyright, ^2, or ^3, use the appropriate html codes:
&trade; for " 
&copy; for ©
&sup2; for ²
&sup3; for ³

If you want some other text up there, then use CSS:
vertical-align:super;
vertical-align:sub;

So you could build some CSS classes such as those below.

To answer your question directly, it's not a deprecated tag.
.sup{
    vertical-align:super;
}

.sub{
    vertical-align:sub;
}

Open in new window

0
 
Tony O'ByrneSenior Web DeveloperCommented:
Btw, The <sup> messes with the line height of the containing element and requires manual font size adjustment in order to look sensible, whereas the character entity doesnt (and is also semantically correct).
0
 
CCSOFlagCommented:
Agreed.  It is not a deprecated tag and there is nothing wrong with using it, but style sheets are typically much more useful and efficient for formatting.  I would say ultimately it will depend on your pages and the data included in them.  If you are only trying to sup one part, then I'd say either way works, but if you are going to be using sup multiple times, definitely go with css.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now