Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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