为我的网站项目设置一个"基本框架",我想知道哪些元素是真正必要/推荐的?特别是,我想知道如何处理语言属性!?在下面的例子中,我认为...... 不必要地重复......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="language" content="en" />
<title> Title </title>
<base href="http://www.mydomain.com" />
<meta name="charset" content="utf-8" />
<meta name="content-language" content="en" />
<meta name="language" content="en" />
<meta name="description" content="description" />
<meta name="keywords" content="keywords" />
</head>
Run Code Online (Sandbox Code Playgroud)
PS"content-language"="语言"?
Ms2*_*ger 14
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Run Code Online (Sandbox Code Playgroud)
绝对推荐
<meta http-equiv="content-style-type" content="text/css" />
Run Code Online (Sandbox Code Playgroud)
没用,浏览器只支持CSS.
<meta http-equiv="content-script-type" content="text/javascript" />
Run Code Online (Sandbox Code Playgroud)
没用,浏览器只支持JavaScript.
<meta http-equiv="content-language" content="en" />
Run Code Online (Sandbox Code Playgroud)
冗余到 <html lang="en">
<meta http-equiv="language" content="en" />
Run Code Online (Sandbox Code Playgroud)
不存在,AFAIK.
<title> Title </title>
Run Code Online (Sandbox Code Playgroud)
绝对推荐.
<base href="http://www.mydomain.com" />
Run Code Online (Sandbox Code Playgroud)
我想,取决于你希望你的相关链接如何工作.
<meta name="charset" content="utf-8" />
<meta name="content-language" content="en" />
<meta name="language" content="en" />
Run Code Online (Sandbox Code Playgroud)
看起来像拼写错误.
<meta name="description" content="description" />
Run Code Online (Sandbox Code Playgroud)
可能有用.
<meta name="keywords" content="keywords" />
Run Code Online (Sandbox Code Playgroud)
由于广泛滥用而被每个搜索引擎忽略.
| 归档时间: |
|
| 查看次数: |
8077 次 |
| 最近记录: |