www.webdeveloper.com
Results 1 to 3 of 3

Thread: W3C validation error (what's up with it?)

  1. #1
    Join Date
    Jun 2012
    Posts
    9

    W3C validation error (what's up with it?)

    Can anyone advise me why this code isn't validating please?
    I've taken a snippet of html from my dynamic 'news' rotator.

    Code:
    <div>	
    	<ul id="fade">      
    		<li><span class="fade_date">26/07/2012</span>
    <p><span class="fade_title"> <a href="news_details.asp?ContentID=253">News title goes here</a></span></p>    
    <span class="fade_content"><p>Every order placed with us before the 31st August 2012 will be automatically entered into a prize draw to win a <strong>Test Kit</strong> worth £204 ex VAT!</p>
    <p>We are a UK site and unless otherwise stated, all prize draws are only&#160;open to UK residents aged 18 or over.</p>
    <p>If you would like to enter our prize draw without making a purchase, please <a href="mailto:competition@oursite.co.uk">click here</a>&#160;or email <a href="mailto:competition@oursite.co.uk">competition@oursite.co.uk</a>.</p>
    <p>Terms &amp; Conditions apply. Winning entry will be selected and notified&#160;by 07/09/2012.</p>
        </span></li>       
    		
        </ul>
    </div>
    Thank you in advance
    Andy

  2. #2
    Join Date
    Jun 2012
    Posts
    9
    the error is:

    Line 14, Column 30: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    <span class="fade_content"><p>Every order placed with us before the 31st August…

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    SPANs and other inline elements cannot contain block level elements like P.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

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