Entity code in Meta tags

V

Veign

This may be a stupid question but I can't find any conclusive information on
it. Should you use entity code in META tags (like keyword or descriptions)?

Pages will validate to XHTML with or without them but trying to find what is
considered best practices
 
D

David Dorward

Veign said:
This may be a stupid question but I can't find any conclusive information
on it. Should you use entity code in META tags (like keyword or
descriptions)?

The rules are no different to anywhere else. Does the character have special
meaning there (e.g. end of attribute value?) or does it not exist in the
character encoding you are using? If yes to either, then it should be
represented by an entity.
 
V

Veign

That's what I figured but found nothing that specifically discussed entity
code in META tags.

Thanx for the heads up...
 
J

Jukka K. Korpela

David said:
The rules are no different to anywhere else. Does the character have special
meaning there (e.g. end of attribute value?) or does it not exist in the
character encoding you are using? If yes to either, then it should be
represented by an entity.

Or as character reference, such as ā. People often get upset when
they need (or think they need) a way to "escape" a character and then
find out that there is no predefined entity for it. Character references
do just as fine or better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top