Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Finishing up development work for a client and they have a late request to superscript every occurrence of the &reg character throughout the site. I merely get by with CSS, but not even sure CSS provides the best solution here. how can I make a global change to every occurrence of a single character in the site copy without going back and adding tags everywhere?

if the best solution does involve inserting a span or other tag I'm thinking it could be accomplished with a database query (all the copy is wired up to a CMS).

share|improve this question

If the content is in a database you should be able to replace all ® in their content with one query (assuming it is all in one table). It would look like this (assuming MySQL):

UPDATE tablename SET fieldname = REPLACE(fieldname, '&reg;', '<sup>&reg;</sup>')


I just used the <sup> tag instead of CSS. You can obviously choose which method you prefer.

share|improve this answer
Hmm.. should it be &reg; and not just &reg ? – LazyOne Jun 21 '11 at 22:15
@dvn66 If modifying the database is not an option or the CMS table structure proves unfathomable, there are also some JavaScript solutions in this question: stackoverflow.com/questions/1703961/… – Nick Jun 21 '11 at 22:21
@LazyOne Yes, there should be a semicolon at the end. Adding it now. – John Conde Jun 21 '11 at 22:24
thank you very much for the replies, I'll implement a solution and report back with any useful findings. – dvn66 Jun 21 '11 at 23:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.