Accesify HTML Table

Discussion in 'HTML & Website Design' started by nickjason, Jul 3, 2009.

  1. #1
    Hi,

    I have a table such that a user can slect one or more rows by checking a checkbox that is present on each row. As per my understanding we should not use checkbox in a table that presents data. I mentioned sample code below. Please advice me how I should go about this..

    Sample code
    -----------

    <html>
    <head></head>
    <body>

    <h3>Select one or more movie</h3>
    <table border="1">
    <tr>
    <th>
    Name
    </th>
    <th>
    Year released
    </th>
    <th>
    Select
    </th>
    </tr>

    <tr>
    <td>
    Manowar
    </td>
    <td>
    1991
    </td>
    <td>
    <INPUT TYPE=CHECKBOX NAME="xx" value=""/>
    </td>
    </tr>
    <tr>
    <td>
    Iron Maiden
    </td>
    <td>
    1994
    </td>
    <td>
    <INPUT TYPE=CHECKBOX NAME="xx" value=""/>
    </td>
    </tr>
    <tr>
    <td>
    Van Halen
    </td>
    <td>
    1992
    </td>
    <td>
    <INPUT TYPE=CHECKBOX NAME="xx" value=""/>
    </td>
    </tr>
    </table>

    </body>
    </html>
     
    nickjason, Jul 3, 2009 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    Personally, I don't see anything wrong with this, but I could be wrong. As long as it works, and (if you are worried about validating) W3 doesn't yell at you during validation, then you should be fine? Check cross browser!
     
    crath, Jul 3, 2009 IP