blackbourna
blackbourna

Reputation: 1233

é HTML Entity code in title tags

I'm trying to use the HTML entity code for 'é' in the title tags of my site, and it doesn't seem to be working in any browser. If I type the French equivalent of "Party:" in the title:

<title>part&eacute;</title> 

I get part&eacute; in the title bar across all browsers when it renders. When I use the 'é' character, it actually works. Does anyone know what is up with this?

Upvotes: 13

Views: 12383

Answers (2)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201618

Entity references work fine (at least as fine as characters entered directly) in title elements. The problem is most probably caused by something that looks like an entity reference to an author when he looks at his files—the data that browsers get does not include it. Some software is used to generate the HTML document from some file that contains &eacute; but the software does not simply pass it forward but e.g. converts & to &amp;.

This can be checked using View Source in a browser.

Upvotes: 19

stefan bachert
stefan bachert

Reputation: 9606

I tried

<!DOCTYPE html>     
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>&eacute;</title>
<div>&eacute;</div>

and it works (FF13)

Upvotes: 3

Related Questions