I'm trying to edit a index.html file but in my heading my html special character code is not showing on the screen.

Example:

<h5>Souscrire &#224; infolettre</h5>

This should display as "Souscrire à infolettre" but the à isn't showing.

link|improve this question
Are you saying that the numeric-encoded character displays properly outside of the heading but not in the heading? What shows up in the heading? Are you using a unicode font for your headings? – Lèse majesté Jan 10 at 7:18
No... Its display properly inside of the heading (<h5>Souscrire &#224; infolettre</h5>) but not outside... Like when I look on my web page... And yes i am using a Unicode font. I don't understand why it does that only when i am using heading tags. – user12552 Jan 10 at 9:15
It seems that you are using different fonts for the heading and for the other parts. – martinstoeckli Jan 10 at 19:01
Ok will check. Thanks for helping! – user12552 Jan 11 at 5:35
1  
@martinstoeckli: You might be right, but it'd have to be a pretty odd font if it doesn't have "à". I'd be more inclined to suspect a simple typo (say, &224; instead of &#224;). – Ilmari Karonen Jan 11 at 15:04
feedback

2 Answers

As a french user, you should not do that. Simply encode all your files in UTF-8 and you will be able to use whatever accent you want : ç,é,è,à,ô...

But you will need to add a little header to the html file.

<meta charset="utf-8">
link|improve this answer
+1; however, I'd suggest <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> for backwards compatibility with pre-HTML5 user agents. (Yes, they do still exist.) – Ilmari Karonen Jan 11 at 15:00
feedback

tehre's nothing wrong with your code, as you can see in this jsfiddle.

the problem has to be something else, but to find that out, we'll nee a bit more information:

  • wich browsers have you tested?
  • do other html-entities work?
  • have you tried creating a new file only containing that one line?
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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