HTML meta tag for content language(内容语言的 HTML 元标记)
问题描述
以下两个 HTML 元标记有什么区别,用于指定西班牙网页内容:
What is the difference between the following two HTML meta tags, for specifying spanish web page content:
<meta name="language" content="Spanish">
和
<meta http-equiv="content-language" content="es">
推荐答案
<元名称=语言";content=西班牙语">
这没有在任何规范中定义(包括 HTML5 草案)
This isn't defined in any specification (including the HTML5 draft)
这是一个真正的 HTTP 标头的穷人版本,应该在标头中真正表达出来.例如:
This is a poor man's version of a real HTTP header and should really be expressed in the headers. For example:
Content-language: es
Content-type: text/html;charset=UTF-8
它表示该文档是为说西班牙语的人准备的(但这并不意味着该文档是用西班牙语编写的;例如,它可以用英语编写,作为针对说西班牙语的语言课程的一部分).
It says that the document is intended for Spanish language speakers (it doesn't, however mean the document is written in Spanish; it could, for example, be written in English as part of a language course for Spanish speakers).
来自规范:
Content-Language entity-header 字段描述了封闭实体的目标受众的自然语言.请注意,这可能不等同于实体主体中使用的所有语言.
The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity. Note that this might not be equivalent to all the languages used within the entity-body.
如果您想声明文档是用西班牙语编写的,那么 使用:
If you want to state that a document is written in Spanish then use:
<html lang="es">
这篇关于内容语言的 HTML 元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:内容语言的 HTML 元标记
基础教程推荐
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
