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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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