简体   繁体   English

注册商标符号 - 哪个是更好的HTML实体或标记?

[英]Registered trademark symbol - which is better HTML entity or markup?

Currently, in all of our html pages, we use the &reg; 目前,在我们所有的html页面中,我们使用&reg; entity for showing the registered trademark symbol, which up until this point I thought was the correct way to have the symbol be shown. 显示注册商标符号的实体,直到此时我才认为是显示符号的正确方法。 However, now one of my tasks is to go through all of the pages and replace it with <sup>®</sup>. 但是,现在我的任务之一是遍历所有页面并将其替换为<sup>®</ sup>。

I wanted to tell my boss that it's wrong to do it this way, but I actually couldn't find any articles that discuss this and which approach is the correct approach. 我想告诉我的老板,这样做是错误的,但我实际上找不到任何讨论这个问题的文章,哪种方法是正确的方法。 Until this point, I just assumed using the html entity approach was the right way but now I'm not so sure. 在此之前,我只是假设使用html实体方法是正确的方法,但现在我不太确定。 Is there a reason why my boss would want to use the tags? 有没有理由让我的老板想要使用标签? What would be the advantage, if any? 如果有的话,有什么好处? Maybe browser compatibility? 也许浏览器兼容?

On a properly encoded site, there is no reason to use HTML entities any more. 在正确编码的站点上,没有理由再使用HTML实体。 Just enter the actual character in the right encoding. 只需在正确的编码中输入实际字符即可。

However, it seems like what your boss really wants is to change the way the character looks . 然而,看起来你的老板真正想要的是改变角色的外观 Turning the entity into the actual character is probably only a side-effect, if he's aware of it at all. 将实体转变为实际角色可能只是副作用,如果他完全意识到它。

This is what it looks like without the <sup> : ® 没有<sup> :®,这就是它的样子

This is what it looks like with the <sup> : ® 这就是<sup>®的样子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM