W3C validation Error with Social buttons on Site

Discussion in 'HTML & Website Design' started by skseofleet, Jan 18, 2012.

  1. #1
    hello forum members,

    I am implementing a new web hosting website to start new services. I integrate my social profile with it in the form of social buttons like fan page button, google plus button, twitter follow, linkedin share button. I pasted the same code in my site as i receive from these social sites. But i go to check for w3c validation then it show me several errors regarding this. The errors are below: -

    Warning: Element name fb:like-box cannot be represented as XML 1.0.
    From line 405, column 1; to line 405, column 134
    cebook-->↩<fb:like-box href="http://www.facebook.com/pages/A7Host/170135309759724" width="292" show_faces="false" stream="false" header="false"></fb:l

    Error: Element fb:like-box not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
    From line 405, column 1; to line 405, column 134
    cebook-->↩<fb:like-box href="url" show_faces="false" stream="false" header="false"></fb:l
    Content model for element div: Flow content.
    Warning: Element name g:plusone cannot be represented as XML 1.0.
    From line 415, column 1; to line 415, column 74
    Button-->↩<g:plusone size="small" annotation="inline" href=""></g:pl



    I don't know what the wrong with this, I am using the HTML5 as my doc type. Have anybody idea what to do?
     
    skseofleet, Jan 18, 2012 IP
  2. freespace

    freespace Well-Known Member

    Messages:
    718
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    140
    #2
    Have you look at the validation tools for suggestions on fixing the errors. Have a look at tidy for a start, you can download it as a firefox plugin. The social buttons might not be compatible with HTML 5 so you may have to modify the code to conform if possible.
     
    freespace, Jan 18, 2012 IP
  3. skseofleet

    skseofleet Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for reply, I have no programming background so enable to do some technical things, Is here any other method to fix such problems?
     
    skseofleet, Jan 18, 2012 IP
  4. Keyser Soze

    Keyser Soze Well-Known Member

    Messages:
    135
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    115
    #4
    Both Google and Facebook are offering HTML5-valid buttons. For example the Google-button looks like this:
    <div class="g-plusone" data-size="medium" data-href="http://www.yourdomain.com/"></div>
    HTML:
    and the facebook button:
    <div class="fb-like" data-href="http://www.yourdomain.com/" data-layout="button_count" data-send="true" data-show-faces="false"></div>
    HTML:
     
    Keyser Soze, Jan 29, 2012 IP