Need a tiny bit of help with a form (not validating in w3)

Discussion in 'HTML & Website Design' started by redslazers, Mar 23, 2010.

  1. #1
    In title its meant to say form not forum sorry

    Hey could someone tell me why this isnt validating at http://validator.w3.org
    Any help would be much appreciated

    It is in xhtml strict

    
    <form method="post" id="searchform" action="#">
    <div class="inputbg">
    <input type="text" class="inputuser" value="Email address" name="email" id="email" onfocus="if (this.value == 'Email address') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Email address';}" />
    </div>
    
     <input type="image" class="inputbutton" src="images/spacer.gif" value="submit"/>
    </form>
    
    HTML:
    Thanks
     
    Last edited: Mar 23, 2010
    redslazers, Mar 23, 2010 IP
  2. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #2
    If validation is all you're after, then throw some <p> tags around the second last line.

    
    <p><input type="image" class="inputbutton" src="images/spacer.gif" value="submit"/></p>
    Code (markup):
     
    Kerosene, Mar 23, 2010 IP
  3. redslazers

    redslazers Peon

    Messages:
    242
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you Kerosene

    I left you rep +
     
    redslazers, Mar 26, 2010 IP