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 元标记


基础教程推荐
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- 直接将值设置为滑块 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01