How Can I Show Special Characters Like "e" With Accent Acute Over It ...

Just browsing Stack Overflow? Help us improve your experience. Sign up for research
    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Companies
    6. Labs
    7. Jobs
    8. Discussions
    9. Collectives
    10. Communities for your favorite technologies. Explore all Collectives

  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Get early access and see previews of new features.

Learn more about Labs How can I show special characters like "e" with accent acute over it in HTML page? Ask Question Asked 14 years, 2 months ago Modified 1 year, 1 month ago Viewed 49k times 14

I need to put the name of some universities on my web page. I have typed them as they were but in some browser or maybe some computers they appear differently. For example, "Universite de Moncton" should have the 2nd "e" in Universite with an accent acute over it. Could you please help about it.

Share Improve this question Follow edited Feb 23, 2017 at 14:48 Borre Mosch's user avatar Borre Mosch 4,5442 gold badges21 silver badges29 bronze badges asked Sep 28, 2010 at 13:00 Pouya BCD's user avatar Pouya BCDPouya BCD 1,0114 gold badges12 silver badges25 bronze badges Add a comment |

7 Answers 7

Sorted by: Reset to default Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 28

If you’re using a character set that contains that character, you can use an appropriate character encoding and use it literally:

Universit‌é de Moncton

Don’t forget to specify the character set/encoding properly.

If not, you can use an HTML character reference, either a numeric character reference that denotes the code point of the character in the Universal Character Set (UCS):

Universit‌é de Moncton Universit‌é de Moncton

Or using an entity reference:

Universit‌é de Moncton

But this entity is just a named representation of the numeric character reference (see the list of entity references that are defined in HTML 4):

<!ENTITY eacute CDATA "&#233;" -- latin small letter e with acute, U+00E9 ISOlat1 --> Share Improve this answer Follow edited Sep 28, 2010 at 13:08 answered Sep 28, 2010 at 13:02 Gumbo's user avatar GumboGumbo 654k112 gold badges790 silver badges851 bronze badges 1
  • 1 Of course you can do what I did ... and select that é in Gumbo's answer and cut and paste it where you need it .... :) – Mat Kay Commented Jul 24, 2013 at 23:45
Add a comment | 5

You can use UTF-8 HTML Entities:

&#232; è &#233; é &#234; ê &#235; ë

Here's a handy search page for the UTF-8 Character Map

Share Improve this answer Follow edited Sep 28, 2010 at 13:12 answered Sep 28, 2010 at 13:05 scunliffe's user avatar scunliffescunliffe 63.4k26 gold badges131 silver badges165 bronze badges Add a comment | 4

I think from the mention that 'in some computers or browsers they appear differently' that the problem you have is with the page or server encoding. You must

  • encode the file correctly (how to do this depends on your text editor)
  • assign the correct encoding in your webpage, done with a meta tag

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

  • force the server encoding with, for example, PHP's header() function:

    header('Content-Type: text/plain; charset=ISO-8859-1');

Or, yes, as everyone has pointed out, use the html entities for those characters, which is always safe, but might make a mess when you try to find-replace in code.

Share Improve this answer Follow edited Sep 28, 2010 at 13:43 answered Sep 28, 2010 at 13:10 Adriano Varoli Piazza's user avatar Adriano Varoli PiazzaAdriano Varoli Piazza 7,4095 gold badges41 silver badges50 bronze badges 1
  • When you don't have control over what is posted to the page where you will be displaying the text (ie. dynamic) this option works. Or if you're pasting text to display on the page (and you can't replace each accented/diacritic character) - this is a great option. Thank you @Adriano (PS: The one that worked for me in a Classic Asp page was to add the meta tag) – Jonno Commented Apr 20, 2022 at 14:14
Add a comment | 3

There are two methods. One is by using "HTML entities." You need to enter them as, for example, &eacute;. Here is a comprehensive reference of named entities; you can also reference the Unicode code point of a given character, using its decimal form as &#1234; or its hex form as &#x4D2;.

Perhaps more common now (ten years after this answer was originally entered) is simply using Unicode characters directly. Rất dễ dàng, phải không? This is more acceptable and universal because most pages now use UTF-8 as their character encoding.

运气!

Share Improve this answer Follow edited Sep 27, 2020 at 15:43 answered Sep 28, 2010 at 13:01 asthasr's user avatar asthasrasthasr 9,3772 gold badges30 silver badges44 bronze badges 1
  • the link is broken. – user111 Commented Sep 26, 2020 at 12:02
Add a comment | 2

By typing it in to your HTML code. é <--You can copy and paste this one if you want. Microsoft windows has a character map for accessing characters not on your keyboard, it's called Character map.

Share Improve this answer Follow answered Sep 28, 2010 at 13:03 Randy the Dev's user avatar Randy the DevRandy the Dev 26.6k6 gold badges45 silver badges54 bronze badges 1
  • 3 +1 Although you have to be sure that the document's Content-Type describes the correct character encoding for that to work – Gareth Commented Sep 28, 2010 at 13:08
Add a comment | 0

http://www.starr.net/is/type/htmlcodes.html

This site shows you the HTML markup for all of those characters that you will need :)

Share Improve this answer Follow answered Sep 28, 2010 at 13:01 Scott's user avatar ScottScott 2,1932 gold badges20 silver badges25 bronze badges Add a comment | 0

In case you need to display a special character, such as the é in an :after (or a :before), you have to look it up from here, and you have to omit the first 0, like so:

div:after { content: "\00E9"; } <div></div>

Share Improve this answer Follow edited Sep 30, 2023 at 9:17 answered Sep 2, 2023 at 18:03 iorgu's user avatar iorguiorgu 2,3343 gold badges18 silver badges30 bronze badges Add a comment |

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid …

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Draft saved Draft discarded

Sign up or log in

Sign up using Google Sign up using Email and Password Submit

Post as a guest

Name Email

Required, but never shown

Post Your Answer Discard

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

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

  • The Overflow Blog
  • Your docs are your infrastructure
  • Featured on Meta
  • More network sites to see advertising test [updated with phase 2]
  • We’re (finally!) going to the cloud!
  • Call for testers for an early access release of a Stack Overflow extension...
Visit chat

Linked

4 How do I debug errors in pandoc conversion of Latex equations to MS Word? 10 How to show Unicode characters in IE using HTML 0 How to transform accented characters in html? 0 how to display special characters correctly in the website - html 1 displaying special characters in IE 7 Why my page cannot display é, instead, showing �? 3 HTML Unicode Issue: How to display special characters 0 how to show special characters on my site? 2 How to use special characters like accented characters in JS? 0 What need I do to get an HTML page to respect a French e (é)? 3 What do I need to do to my HTML to allow accented characters to properly display?

Hot Network Questions

  • Is my "escaping" wrong - or is it something else?
  • Why do some claim that the law of non-contradiction is non-trivially unprovable?
  • Why is Anarchism not considered fundamentally against the "democratic order" in Germany?
  • How to avoid wasting reader investment with a thematically disappointing ending?
  • Does synonymy seep down to the fragments of theories?
  • What is the polymorph reached by letting the chocolate cool down?
  • What is this insect found in an apartment in Brazil?
  • Tire traction straps are difficult to remove
  • How to say "Each one of the following" in German?
  • Finding the minimum through a chain of inequalities
  • Can I freely choose the spellcasting ability of Magic initiate, or is it tied to the spell list that I chose?
  • Student is almost always late, and expects me to re-explain everything he missed
  • Wouldn't the ban of TikTok violate freedom of speech?
  • Short story about a man living In an apartment who's curious about his neighbor who turns out to be a monster or demon
  • Late 70s/Early 80s android made-for-TV movie
  • Movie about a post apocalyptic world with a scorching hot sun
  • How can I reference sky photos to a star map?
  • Is there a better way to implement `\ifblank` condtion check when there are multiple option arguments with default values in a command definition
  • How can I solve my equation with the best numerical precision?
  • Syllables of noun ‹cavalier›?
  • Convert Date and Time to a Date Time
  • Why don't routers answer ARP requests for IP addresses they can handle even if they aren't assigned that IP address themselves?
  • Why is it safe to soak an electric motor in isopropyl alcohol but not distilled water?
  • Why Adam and Eve were created naked?
more hot questions Question feed Subscribe to RSS Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-html

Từ khóa » Html Accent Codes