【问题标题】:text format in HTML5 [duplicate]HTML5中的文本格式[重复]
【发布时间】:2021-09-12 11:24:37
【问题描述】:

当我在我的标签h1 中输入一个短语时。

例如,我用法语写一个短语 -> Nous découvrir en vidéo

<h1 class="primaryTitle"> Nous découvrir en vidéo </h1>

在显示中,我收到了这条消息

Nous découvrir en vidéo

我不明白问题出在哪里?

我想,问题可能就在这里?

<!DOCTYPE html><html>

<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />
<head>
<title>title</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" href="../favicon.gif" >
<script language="JavaScript" type="text/javascript">
</script>
</head>
  

谢谢

【问题讨论】:

标签: html


【解决方案1】:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <h1>Nous découvrir en vidéo</h1>
</body>
</html>

将元标记中的字符集更改为“UTF-8”,这在我尝试时有效

【讨论】:

    【解决方案2】:

    你可以试试这个吗?

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <h1 class="primaryTitle"> Nous découvrir en vidéo </h1>
    </body>
    </html>
    

    英语

    <html lang="en">
    

    法语

    <html lang="fr">
    

    【讨论】:

    • 指定文档的编写语言,虽然一般来说是件好事,但无助于解决字符编码问题。
    • 字符集也设置为 UTF-8。两者结合是个好主意。
    • 猜测字符编码也不是一个好主意。
    猜你喜欢
    • 2014-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-06
    • 1970-01-01
    • 2018-03-06
    相关资源
    最近更新 更多