valid html ? - Ext JS

本文讨论了HTML中表单元素使用时未包含form标签的问题,并解释了为何某些情况下输入框可以不被form标签包裹。同时,文章还探讨了使用表格进行布局的原因,特别是在需要跨浏览器兼容性和垂直居中的场景下。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hi,

Ive some internal html design questions. I've noticed that at some places input fields are being used without form tags anywhere around them, as far as i know this does not correctly w3c validate (at least not not under strict)? Why havent form tags been included? Also I noticed that at some places tables are being used for layout purposed (for example in the toolbar). Why was this decision made?

Thanks,

Seldon
Reply With Quote
  #2  
Old 03-09-2007, 07:28 AM
DefaultRe: valid html ?

Quote:
Originally Posted by seldon
Hi,

Ive some internal html design questions. I've noticed that at some places input fields are being used without form tags anywhere around them, as far as i know this does not correctly w3c validate (at least not not under strict)? Why havent form tags been included? Also I noticed that at some places tables are being used for layout purposed (for example in the toolbar). Why was this decision made?

Thanks,

Seldon
As far as form tags go, that's something you should be adding around your inputs. I think a form tag is required in XHTML, not sure about HTML.

I've also been wondering why Jack chose to use tables for that kind of stuff.
Reply With Quote
  #3  
Old 03-09-2007, 05:05 PM
Default

Seldon, you need to include the form tags. Having fields generate their own form tags IMO doesn't make much sense.

As for the tables, they are used where required. Trust me, I don't want to use them, but until the w3c ..... I won't go there.

For the toolbars, they can contain any number of element types (buttons, raw text, inputs, selects, etc) and all need to be vertically aligned center. Literally, you can add anything you want to a toolbar. To do that cross-browser, a table is needed.

As for validating, I never jumped on that boat. I would rather write pages/applications that actually work cross-browser, instead ones the w3c says should work cross-browser.
Reply With Quote
  #4  
Old 03-10-2007, 05:05 AM
Default

Jack, i understand what you mean and i totally agree that its really nasty to get everything to look and work cleanly crossbrowser without the tables. About the inputs, i was mainly refering to the page input box in the toolbar. I think many peopel would forget about including a form tag for this 'auto generated' piece of html. But then again, if it works without the formtag (as it in fact does), why bother
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值