本文介绍了推荐元元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为我的网站项目建立一个基本框架,我想知道哪些元素是真正必要/推荐的?特别是,我想知道如何处理语言属性(S)!?在下面的例子中,我想。 ...

 <!DOCTYPE html PUBLIC -  // W3C // DTD XHTML 1.0 Strict // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> 

< head>

< meta http-equiv =content-typecontent =text / html; charset = utf-8/>
< meta http-equiv =content-style-typecontent =text / css/>
< meta http-equiv =content-script-typecontent =text / javascript/>
< meta http-equiv =content-languagecontent =en/>
< meta http-equiv =languagecontent =en/>

< title>标题< / title>
< base href =http://www.mydomain.com/>

< meta name =charsetcontent =utf-8/>
< meta name =content-languagecontent =en/>
< meta name =languagecontent =en/>

< meta name =descriptioncontent =description/>
< meta name =keywordscontent =keywords/>

< / head>

content-language=language?

解决方案

 < meta http-equiv =content-typecontent =text / html; charset = utf-8/> 

绝对推荐

 < meta http-equiv =content-style-typecontent =text / css/> 

没用,浏览器只支持CSS。

 < meta http-equiv =content-script-typecontent =text / javascript/> 

没用,浏览器只支持JavaScript。

 < meta http-equiv =content-languagecontent =en/> 

冗余到< html lang =en>
pre $ lt; code>< meta http-equiv =languagecontent =en/>

不存在,AFAIK。

 <标题>标题< / title> 

绝对值得推荐。

 < base href =http://www.mydomain.com/> 

取决于您希望您的相关链接如何工作,我想是的。

 < meta name =charsetcontent =utf-8/> 
< meta name =content-languagecontent =en/>
< meta name =languagecontent =en/>

看起来像打字错误。

 < meta name =descriptioncontent =description/> 

可能有用。

 < meta name =keywordscontent =keywords/> 

由于广泛滥用,每个搜索引擎都忽略它。


Setting up a "basic framework" for my website projects, I'm wondering which meta elements are really necessary/recommended? In particular, I'd like to know how to deal with the language attribute(s)!? In the following example, I think sth. is repeated unnecessarily...

<!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>

P.S. "content-language" = "language"?

解决方案
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

Definitely recommended

<meta http-equiv="content-style-type" content="text/css" />

Useless, browsers only support CSS.

<meta http-equiv="content-script-type" content="text/javascript" />

Useless, browsers only support JavaScript.

<meta http-equiv="content-language" content="en" />

Redundant to <html lang="en">

<meta http-equiv="language" content="en" />

Doesn't exist, AFAIK.

<title> Title </title>

Definitely recommended.

<base href="http://www.mydomain.com" />

Depends on how you want your relative links to work, I suppose.

<meta name="charset" content="utf-8" />
<meta name="content-language" content="en" />
<meta name="language" content="en" />

Look like typo's.

<meta name="description" content="description" />

Probably useful.

<meta name="keywords" content="keywords" />

Ignored by every search engine due to widespread abuse.

这篇关于推荐元元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 04:33