www.webdeveloper.com
Results 1 to 2 of 2

Thread: W3 error The for attribute of the label element must refer to a form control.

  1. #1
    Join Date
    Mar 2013
    Posts
    2

    W3 error The for attribute of the label element must refer to a form control.

    hallo all ,
    can anyone help me out how or where to put id in html code cuz when i validate it gives me error.
    HTML Code:
                                   <legend>Meat Toppings</legend>
    					<label for="location">Location</label>
    							<IMG SRC="full.png" alt="full">
    							<IMG SRC="left.png" alt="left">
    							<IMG SRC="right.png" alt="right">
    							<IMG SRC="none.png" alt="none"
    W3C error

    Line 109, Column 27: The for attribute of the label element must refer to a form control.
    <label for="location">Location</label>

    i have spend several hours trying to solve this error but to no good result.
    thank you

  2. #2
    Join Date
    Mar 2012
    Posts
    1,119
    The label must be specific to a single control. There are no controls in the example you gave. So what are you trying to label???

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles