w3.org standards

Discussion in 'HTML & Website Design' started by jonno_81, Jan 3, 2010.

  1. #1
    Hi all,

    I'm trying to get my site verified according to W3's strict standard (excuse me if I haven't got the names quite right).

    Anyway, I've taken my website from 200 errors to about 80. Will do the rest another time.

    I'm having a problem with this though, and I'm not sure why:

    <p />&nbsp;<p />
    HTML:

    Below is the exact wording on their site:

    #  Error  Line 298, Column 46: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag
    
                                  <p />&nbsp;<p />
    
    ✉
    
    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    
    HTML:

    Thanks, John
     
    jonno_81, Jan 3, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Depends on the surrounding html but <p /> is incorrect anyway. A paragraph should be:
    <p>&nbsp;</p>
     
    drhowarddrfine, Jan 3, 2010 IP