SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow xhtml strict <textarea>

    The validator says I have to include a rows and cols attribute value for every <textarea>? Is this true for XHTML Strict?

    I set the height and width with CSS... but now if I have to do it with XHTML... do I just delete my CSS specs for the height and width of the textarea?

    Thanks.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Only if you want to remove the CSS though rows and cols can mean different things to width and height with CSS.

  3. #3
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by seodevhead
    The validator says I have to include a rows and cols attribute value for every <textarea>? Is this true for XHTML Strict?

    I set the height and width with CSS... but now if I have to do it with XHTML... do I just delete my CSS specs for the height and width of the textarea?

    Thanks.
    If you want to validate to a strict doctype you need to include the attributes (which will be overridden/applied if CSS is) - this is so that the textarea has something close to the shape you would like in the absense of CSS.

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Think of it this way. The XHTML attributes (which are required) would act like a Plan B (for those who don't have CSS enabled). When designing with CSS, you have to keep the actual page structure in mind. Especially for those using assistive devices like screen readers and those who have browsers that do not support CSS.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •