使用< fieldset> /< legend>没有形式 [英] Using <fieldset>/<legend> without forms

查看:48
本文介绍了使用< fieldset> /< legend>没有形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇小组对使用< fieldset>

和< legend>的感受。除了< form>之外的元素周围的标签元素...我

写了一个小测试文件:

< http://www.learnsomethingnew.us/fieldset.html>

来说明这一点,并在W3C和WDG站点进行了验证。

(它是< fieldset>围绕< table>和< p>)。


我可以在Opera 7.23,Mozilla 1.6和IE 6上查看它。(Moz 1.6

也在标准合规模式下呈现它。)


这让我很感兴趣,因为我们不能使用< fieldset>这样看起来很可耻。对于我们想要的任何东西,因为它非常方便。这是HTML 4.01规范中的

记录:< http://tinyurl.com/2sbn4>。我不知道如何阅读DTD,但我没有看到任何形式的提及,除了

在评论部分。


沿着这些行编写的HTML是否可能会破坏未来的浏览器?b
如果没有,是否有任何令人信服的理由不使用

< fieldset>以任何方式验证?


Ian

-
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/

I''m curious as to the group''s feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... I
wrote a small test file:
<http://www.learnsomethingnew.us/fieldset.html>
to illustrate this, and it validated at both the W3C and WDG sites.
(It''s a <fieldset> around a <table> and <p>).

I''m able to view it on Opera 7.23, Mozilla 1.6, and IE 6. (Moz 1.6
renders it in Standards Compliance Mode as well.)

This interests me, because it seems like such a shame that we can''t
use <fieldset> for anything we want, since it''s so handy. Here''s the
write-up in the HTML 4.01 spec: <http://tinyurl.com/2sbn4>. I don''t
know how to read a DTD, but I don''t see any mention of forms except
in commented sections.

Is it likely that HTML written along these lines will break in
future browsers? If not, is there any compelling reason not to use
<fieldset> in any way that validates?

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/

推荐答案

Ian Rastall< id ******* @ sbcglobal。净>写道:
Ian Rastall <id*******@sbcglobal.net> wrote:
我很好奇小组对使用< fieldset>
和< legend>的感受除了< form>之外的元素周围的标签元素......
- - 这些行写的HTML很可能会在未来的浏览器中出现吗?
I''m curious as to the group''s feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... - - Is it likely that HTML written along these lines will break in
future browsers?




很多人都说< ;字段集>和< legend>在_current_

浏览器中被打破了,更不用说那些根本没有得到它们的旧浏览器了。


我认为主要关注的是用户混淆。表单字段应该看起来像表单字段一样,其他东西也不应该。


-

Yucca, http://www.cs.tut.fi/~jkorpela/

有关网页制作的网页: http:/ /www.cs.tut.fi/~jkorpela/www.html



Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don''t get them at all.

I think the main concern is user confusion. Form fields should look
like form fields, and other things shouldn''t.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


" Jukka K. Korpela" < JK ****** @ cs.tut.fi>写道:
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote:
Ian Rastall< id ******* @ sbcglobal.net>写道:
Ian Rastall <id*******@sbcglobal.net> wrote:
我很好奇小组对使用< fieldset>
和< legend>的感受除了< form>之外的元素周围的标签元素... - -
I''m curious as to the group''s feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... - -
在未来的浏览器中,这些行写的HTML是否可能会中断?
Is it likely that HTML written along these lines will break in
future browsers?



很多人都说< ;字段集>和< legend>在_current_
浏览器中被破坏了,更不用说那些根本没有得到它们的旧浏览器了。



Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don''t get them at all.




我很好奇你的意思是什么"碎" ;.我刚刚第一次将它们用于

,并且发现它们看起来就像它们应该默认在IE6和Mozilla中的b / b
,分组控件和标签他们。他们是否意味着除了那之外还有某种功能?
我认为主要关注的是用户混淆。表单字段应该看起来像表单字段,其他东西不应该。



I''m curious what you mean by "broken". I''ve just used them for the
first time, and find them to look just as they ought to by default in
both IE6 and Mozilla, grouping controls and labeling them. Are they
meant to have some kind of function beyond that?
I think the main concern is user confusion. Form fields should look
like form fields, and other things shouldn''t.




我猜测OP正在使用某种表单字段通过网络提供的客户端

应用程序。大多数用户都不知道HTML表单是什么,或者某个控件是否在一个上面。

语义上,如果你没有为服务器提交数据-b>

处理,不应该在没有< form>的情况下使用控件?但是一个

复选框仍然应该像一个复选框和一个按钮一样向用户看。

就像一个按钮。

-

Harlan Messinger

从我的电子邮件地址中删除第一个点。

Veuillez?ter le premier point de mon adresse de courriel。



I''m guessing the OP is using form fields for some kind of client-side
application served over the web. Most users have no conception of what
an HTML form is or whether a given control is on one or not.
Semantically, if you''re not submitting data for server-side
processing, shouldn''t the controls be used without a <form>? But a
checkbox should still look to the user like a checkbox, and a button
like a button.
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ?ter le premier point de mon adresse de courriel.


Ian Rastall写道:
Ian Rastall wrote:
我很好奇小组对使用< fieldset>
的感受和< legend>除了< form>之外的元素周围的标签元素......我写了一个小测试文件:
< http://www.learnsomethingnew.us/fieldset.html>
来说明这一点,并在W3C上验证了和WDG网站。
(它是< fieldset>围绕< table>和< p>)。


如果一个字段集不包含字段,那么它是一个字段集吗?

这让我很感兴趣,因为看起来真是太遗憾了我们不能
使用< fieldset>对于我们想要的任何东西,因为它非常方便。


我不明白为什么它在你的例子中如此方便。除了视觉效果之外,

的用途是什么?

沿着这些方式编写的HTML是否可能在未来的浏览器中破坏?如果没有,是否有任何令人信服的理由不使用
< fieldset>以任何方式验证?
I''m curious as to the group''s feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... I
wrote a small test file:
<http://www.learnsomethingnew.us/fieldset.html>
to illustrate this, and it validated at both the W3C and WDG sites.
(It''s a <fieldset> around a <table> and <p>).
If a fieldset contains no fields, is it a fieldset?
This interests me, because it seems like such a shame that we can''t
use <fieldset> for anything we want, since it''s so handy.
I don''t see why it is so handy in your example. What is the purpose of
having it, besides the visual effect?
Is it likely that HTML written along these lines will break in
future browsers? If not, is there any compelling reason not to use
<fieldset> in any way that validates?




语义。字段集允许作者将与主题相关的

控件和标签分组。你没有用它来分组任何形式

控件/标签。


看来这里唯一的用途是它的默认视觉效果

浏览器,一个难以用更多

语义准确的标签进行复制。


- < br $>
Bill Mason

无障碍互联网
http://www.accessibleinter.net/

前缀@ accessibleinter.net上有回复的内容



Semantics. A fieldset "allows authors to group thematically related
controls and labels". You are not using it to group any form
controls/labels at all.

It appears that the only use for it here is the default visual effect in
browsers, one that wouldn''t be that hard to replicate with more
semantically accurate tags.

--
Bill Mason
Accessible Internet
http://www.accessibleinter.net/
prefix @accessibleinter.net with anything to reply


这篇关于使用&lt; fieldset&gt; /&lt; legend&gt;没有形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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