Spanish Characters in HTML Page Title

2020-08-25 05:32发布

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

enter image description here

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

标签: html utf-8
7条回答
我只想做你的唯一
2楼-- · 2020-08-25 05:50
<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

查看更多
▲ chillily
3楼-- · 2020-08-25 05:55

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

查看更多
唯我独甜
4楼-- · 2020-08-25 06:00

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";
查看更多
乱世女痞
5楼-- · 2020-08-25 06:01

This works.

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Telefonía</title>
</head>
查看更多
乱世女痞
6楼-- · 2020-08-25 06:04

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

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

查看更多
We Are One
7楼-- · 2020-08-25 06:07

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

查看更多
登录 后发表回答