DOCTYPE声明 [英] DOCTYPE declarations

查看:133
本文介绍了DOCTYPE声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一些问题,协调浮动并以多种浏览器正确显示它们的方式清除它们。在离开它一段时间之后,我能够回来看看需要修复的大部分

问题。它现在适用于我可以访问的所有浏览器,除了N4,我忽略了,因为我不知道从哪里开始这个问题。


我目前的问题是验证器。我真的很想学会正确地学习

所以让我感到困扰的是我无法弄清楚我需要做些什么才能纠正我的前几个代码行。我认为

验证器根据这些声明给出了我的错误,但我不会理解它们,以便猜测如何纠正它们。我开始使用:




<!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"郎= QUOT;恩" xml:lang =" en">


因为我的花车不起作用,建议我更换它们

到:


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" http://www.w3.org /TR/html4/strict.dtd">

< html xmlns =" http://www.w3.org/1999/xhtml"郎= QUOT;恩" xml:lang =" en">


我正在尝试将缩略图图像链接到相同的更大版本和

可能会确定使用html doctype我需要声明。我可以

只做猜测。您的建议将受到欢迎,样本页面位于
http:// www。 kencoffman.com/templates.htm

解决方案

曾几何时* ima *写道:
< blockquote class =post_quotes>我遇到了一些问题,协调浮动并以多种浏览器正确显示它们的方式清除它们。在离开它一段时间之后,我能够回来看看*大多数需要修复的问题。它现在适用于我可以访问的所有浏览器,除了N4,我忽略了,因为我不知道从哪里开始这个问题。

我目前的问题是验证器。我真的很想学会正确地做这个,所以让我感到困扰的是,我似乎无法弄清楚我需要做些什么来纠正我的前几行代码。我认为
验证器根据这些声明给我错误,但我不太了解它们以便猜测如何纠正它们。我开始使用:

<!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"郎= QUOT;恩" xml:lang =" en">

因为我的花车不起作用,建议我将它们更改为:

< !DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"
" http://www.w3.org/TR/html4/strict.dtd">
< ; html xmlns =" http://www.w3.org/1999/xhtml"郎= QUOT;恩" xml:lang =" en">

我正在尝试将缩略图图像链接到相同的更大版本,
可能会确定我需要声明的html doctype。我只能做猜测。您的建议将受到欢迎,样本页面位于
http:// www。 kencoffman.com/templates.htm




使用HTML 4.01 Stict,但没有xmlns,lang和和xml

html标签中的内容,因为它们与XHTML一起使用而不与HTML一起使用。

只是一个简单的< html>将为HTML做。


-

/ Arne

如果你发帖,你将被忽略,不要引用什么

你只回复和剪切签名!
http://www.safalra.com/special/googlegroupsreply/


" ima" < IM ********* @ yahoo.com>写道:

我目前的问题是验证器。我真的很想学会正确地做这个,所以让我感到困扰的是,我似乎无法弄清楚我需要做些什么来纠正我的前几行代码。我认为
验证器根据这些声明给我错误,但我不太了解它们以便猜测如何纠正它们。


验证者的报告不能简单得多。

<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"
" http://www.w3.org/TR/html4/strict.dtd">
< html xmlns =" http://www.w3。组织/ 1999 / XHTML"郎= QUOT;恩" xml:lang =" en">




将最后一行更改为


< html lang =" en>


然后摆脱< a>的宽度和高度属性元素为

验证者指出。


-

Spartanicus


Spartanicus - 感谢您的帮助!如果您碰巧知道任何地方

在线解释这些声明,我会对

网址非常感兴趣。


我想这意味着没有办法遵循任何一套html规则和

能够将我的缩略图链接到相同图像的更大版本。

(显然不是没有为每个较大的图像创建一个单独的页面

并链接到那个)我错过了一个明显的选择吗?再次感谢

验证器翻译。


I was having some problems co-ordinating floats and clearing them in a
way that multiple browsers would display them correctly. After getting
away from it for a while, I was able to come back and see *most* of the
problems needing fixing. It now works with all the browsers that I
have access to except N4 which I''m ignoring since I don''t know where to
begin with that problem.

My current problem is "validators". I really would like to learn to do
this correctly so it bothers me that I can''t seem to figure out what I
need to do to correct my first few lines of code. I think the
validator is giving me errors based on these declarations but I don''t
understand them well enough to guess how to correct them. I started
with:

<!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" lang="en" xml:lang="en">

Because my floats weren''t working, it was suggested that I change them
to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

I''m trying to link thumbnail images to larger versions of the same and
maybe that will determine with html doctype I need to declare. I can
only make guesses. Your advice would be welcomed the sample page is at
http://www.kencoffman.com/templates.htm

解决方案

Once upon a time *ima* wrote:

I was having some problems co-ordinating floats and clearing them in a
way that multiple browsers would display them correctly. After getting
away from it for a while, I was able to come back and see *most* of the
problems needing fixing. It now works with all the browsers that I
have access to except N4 which I''m ignoring since I don''t know where to
begin with that problem.

My current problem is "validators". I really would like to learn to do
this correctly so it bothers me that I can''t seem to figure out what I
need to do to correct my first few lines of code. I think the
validator is giving me errors based on these declarations but I don''t
understand them well enough to guess how to correct them. I started
with:

<!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" lang="en" xml:lang="en">

Because my floats weren''t working, it was suggested that I change them
to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

I''m trying to link thumbnail images to larger versions of the same and
maybe that will determine with html doctype I need to declare. I can
only make guesses. Your advice would be welcomed the sample page is at
http://www.kencoffman.com/templates.htm



Use the HTML 4.01 Stict, but without the "xmlns", "lang" and "xml"
things in the html tag as they are used with XHTML and not with HTML.
Just a simple <html> will do for HTML.

--
/Arne
You will be ignored if you top post, don''t quote what
you are replying to and cut of only the signatures!
http://www.safalra.com/special/googlegroupsreply/


"ima" <im*********@yahoo.com> wrote:

My current problem is "validators". I really would like to learn to do
this correctly so it bothers me that I can''t seem to figure out what I
need to do to correct my first few lines of code. I think the
validator is giving me errors based on these declarations but I don''t
understand them well enough to guess how to correct them.
The validator''s report couldn''t be much simpler.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">



Change that last line to

<html lang="en">

then get rid of the width and height attributes on the <a> elements as
the validator points out.

--
Spartanicus


Spartanicus - Thanks for your help! If you happen to know of any place
online that explains these declarations, I''d be very interested in the
web address.

I guess this means there is no way to follow any set of html rules AND
be able to link my thumbnails to larger versions of the same images.
(Apparently not without creating a separate page for each larger image
and linking to that) Am I missing an obvious alternative? Thanks
again for the validator translation.


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆