Spanish Characters in HTML Page Title

2020-08-25 05:26发布

问题:

My HTML code for Page title looks like this

<title>Telefonía</title>

When i check it on browser the SPanish character is not displayed exactly like the above

It shows page title as below

I tried using & iacute; AND **&# 237; ** but it doesnt work in PAGE TITLE

Here is my website url http://tinyurl.com/agdsqff i checked all the special codes but it doesnt work

回答1:

Try writing

&iacute;

instead. These are HTML escape characters. Here you can find a whole list http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php



回答2:

This works.

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Telefonía</title>
</head>


回答3:

Put this in your <head>:

<meta charset="UTF-8">

and if you want change your title dynamically in you .js put:

document.title="telefonía";


回答4:

See http://www.ascii.cl/htmlcodes.htm to check how you should encode special characters.

In this case it would be &#237; or &Iacute;



回答5:

You have to check two things:

  1. Your file encoding. Yes, your HTML file. You have to save it as UTF-8 and then write "í" or whatever character you need.
  2. Your <meta> tag. It should look like:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Un saludo!



回答6:

The element <title>Telefonía</title> works just fine, provided that the document is saved in UTF-8 encoding (which is the encoding declared in an HTTP header sent by the server – no meta tag inside the document can override that).

You seem to be changing the content of your page trying various ways that cannot work, such as <title>Telefon&iacute;a</title> and <title>Telefoniacute;a</title>. If you use an entity reference, you should write <title>Telefon&iacute;a</title>. But there is no need for that: using the character as such is cleaner and simpler



回答7:

<p>Telefon&#237a</p> 

is the hex code for it. &iacute works as well http://jsfiddle.net/PDCvw/ EDIT
It appears to work for me in the title. A link is http://shodor.org/~amalani/acute.html You have the code

<title>Telefon&amp;iacute;a</title>

but what you need is Telefon&iacutea

Telefonía



标签: html utf-8