1

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.

4
  • 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? Commented Jan 10, 2012 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. Commented Jan 10, 2012 at 9:15
  • It seems that you are using different fonts for the heading and for the other parts. Commented Jan 10, 2012 at 19:01
  • 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;). Commented Jan 11, 2012 at 15:04

2 Answers 2

4

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"> 
1
  • +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.) Commented Jan 11, 2012 at 15:00
0

there'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:

  • which browsers have you tested?
  • do other html-entities work?
  • have you tried creating a new file only containing that one line?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.