关于XHTML< head>的问题内容 [英] Questions about XHTML <head> Content
问题描述
这是一个相当普遍的主题,我道歉。
我是XHTML,CSS等人的新手,我遇到了麻烦
了解DTD和xml名称空间声明。
例如:
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN" ;
" http://www.w3.org/TR/xhtml1/DT?D / xhtml1-strict.dtd">
< ; html xmlns =" http://www.w3.org/1999/xhtml" XML:朗= QUOT;恩" lang =" en">
特别是,URL提供了什么?
如果是DTD ,URL指向包含
批次<!ENTITY ...的文件。这是什么文件?
xmlns URL指向一个目录。那里有什么东西吗?
其次,为XHTML Strict指定charset
的正确方法是什么?
< meta http-equiv =" Content-Type"含量=" text / html的;字符集= UTF-8英寸/>
或
<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>
Chad
This is a rather general subject, I apologize.
I am new to XHTML, CSS, et al and I am having trouble
understanding the DTD and xml namespace declarations.
For example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DT?D/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
In particular, what do the URL''s provide?
In the case of the DTD, the URL points to a file containing
lots of "<!ENTITY ...". What is this file?
The xmlns URL points to a directory. Is there something in there?
Secondly, what is the proper way to specify the charset
for XHTML Strict?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Or
<?xml version="1.0" encoding=" UTF-8" ?>
Chad
推荐答案
2005年5月19日, cc ***** @ yahoo.com 写道:
On 19 May 2005, cc*****@yahoo.com wrote:
其次,指定charset的正确方法是什么
对于XHTML Strict?
< meta http-equiv =" Content-Type"含量=" text / html的;字符集= UTF-8英寸/>
否。作为名称http-equiv建议,这只是一个ersatz。
http://ppewww.ph.gla.ac.uk/~flavell/...t/ns-burp.html
或
<? xml version =" 1.0"编码= QUOT; UTF-8英寸?>
Secondly, what is the proper way to specify the charset
for XHTML Strict?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
No. As the designation "http-equiv" suggests, this is only an ersatz.
http://ppewww.ph.gla.ac.uk/~flavell/...t/ns-burp.html
Or
<?xml version="1.0" encoding=" UTF-8" ?>
这是声明*文档*的编码的正确方法。
但是,你应该总是设置HTTP相应的标题
当您通过HTTP提供此文档时:
http://www.w3.org/International/O-HTTP-charset.html
-
每个人都期待德国宗教裁判所。
This is the proper way to declare the encoding for *the document*.
However, you should always set the HTTP header accordingly
when you serve this document via HTTP:
http://www.w3.org/International/O-HTTP-charset.html
--
Everybody expects the German Inquisition.
cc ***** @ yahoo.com 写道:
cc*****@yahoo.com wrote:
我是XHTML,CSS等人的新手,我是难以理解DTD和xml名称空间声明。
例如:
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN" ;
" http://www.w3.org/TR/xhtml1/DT?D / xhtml1-strict.dtd">
< html xmlns =" http: //www.w3.org/1999/xhtml" XML:朗= QUOT;恩" lang =" en">
特别是,URL提供了什么?
对于DTD,URL指向包含的文件
很多<!ENTITY ......。这是什么文件?
定义XHTML语法的XML DTD(文档类型定义)
1.0文档。然后,您可以使用验证器检查
文档是否符合声明的语法。
xmlns URL指向目录。那里有东西吗?
命名空间URL是一个名称,URL用于提供全球唯一的
名称,但通常URL不指向资源。 br />
其次,为XHTML Strict指定字符集的正确方法是什么?
< meta http-equiv =" Content-Type"含量=" text / html的;字符集= UTF-8英寸/>
或
<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>
I am new to XHTML, CSS, et al and I am having trouble
understanding the DTD and xml namespace declarations.
For example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DT?D/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
In particular, what do the URL''s provide?
In the case of the DTD, the URL points to a file containing
lots of "<!ENTITY ...". What is this file?
An XML DTD (document type definition) that defines the grammar of XHTML
1.0 documents. You can use a validator then to check whether the
document adheres to the declared grammar.
The xmlns URL points to a directory. Is there something in there?
A namespace URL is a name, URLs are used to provide a world-wide unique
name but usually the URL does not point to a resource.
Secondly, what is the proper way to specify the charset
for XHTML Strict?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Or
<?xml version="1.0" encoding=" UTF-8" ?>
这取决于您希望如何处理XHTML,对于XML解析器
您需要声明编码XML声明(虽然对于
UTF-8和UTF-16声明是可选的)。
但是很多人使用XHTML将它作为text / html提供给HTML浏览器
喜欢IE,然后XML声明被忽略,所以在这种情况下它使
有意义使用meta元素(除非你像Andreas那样已经
建议并使用HTTP响应标头)。
-
Martin Honnen
http://JavaScript.FAQTs.com/
文章
< Pi ************************************* @ s5b004.rr zn.uni-hannover.de>,
Andreas Prilop< nh ****** @ rrzn-user.uni-hannover.de>写道:
In article
<Pi*************************************@s5b004.rr zn.uni-hannover.de>,
Andreas Prilop <nh******@rrzn-user.uni-hannover.de> wrote:
<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>
<?xml version="1.0" encoding=" UTF-8" ?>
这是为文档*声明编码的正确方法。
但是,您应该始终相应地设置HTTP标头
通过HTTP提供此文档:
http:// www.w3.org/International/O-HTTP-charset.html
application / xml或
不需要charset参数
申请/ * + xml。考虑到Ruby的假设,在某些情况下甚至可能会争论
在这些情况下使用charset参数是一个坏主意。
-
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author常见问题: http://mozilla.org/docs/web-developer/ faq.html
The charset parameter is not necessary with application/xml or
application/*+xml. Considering Ruby''s Postulate, one might even argue
using the charset parameter is a bad idea in those cases.
--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
这篇关于关于XHTML< head>的问题内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!