Spanish Characters in HTML Page Title

风流意气都作罢 提交于 2020-06-25 09:05:23

问题


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


回答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



来源:https://stackoverflow.com/questions/14936291/spanish-characters-in-html-page-title

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!