开发者

Writing valid XHTML textareas's? Cannot leave out rows & cols?

开发者 https://www.devze.com 2023-02-17 16:55 出处:网络
I try & write valid XHTML but I just checked some code & it is complaining of the \"cols\" & \"r开发者_JAVA技巧ows\" attributes being required when using textareas\'s?

I try & write valid XHTML but I just checked some code & it is complaining of the "cols" & "r开发者_JAVA技巧ows" attributes being required when using textareas's?

Like anyone these days I would guess I am using CSS to set the width & height of them. Why do I need to use them? Can I just set them to blank?

<textarea rows="" cols="" ></textarea>


The cols and rows attribute are deemed required in the recommendations for XTHML and HTML 4.01. Anyway, if you leave them out, they have default values (20 and 2 resp.)

0

精彩评论

暂无评论...
验证码 换一张
取 消