Can symbols like ™
and ®
go directly in the meta
-description
tag, or should their HTML character codes be used?
<meta name="description" content="Hello® World™">
<meta name="description" content="Hello® World™">
If the character encoding of the HTML document allows it, use the characters directly. The HTML spec recommends to use UTF-8 ("Authors should use UTF-8."), which is an encoding that allows this.
Relevant article from the W3C Internationalization Working Group:
Using character escapes in markup and CSS
You must still use entities for characters that have a reserved meaning in HTML, if the context makes them ambiguous.
Examples:
<
(as <
)>
(as >
)&
(as &
)"
(as "
)'
(as '
)It can be a good idea to use entities for invisible characters (other than the common ones for space, tab, and new line), so that authors don’t confuse/overlook them.