Title: Invalid HTML generated by plugin?
Last modified: September 6, 2016

---

# Invalid HTML generated by plugin?

 *  [cecil1654](https://wordpress.org/support/users/cecil1654/)
 * (@cecil1654)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/invalid-html-generated-by-plugin/)
 * Hey,
    first, great plugin, thanks for building and maintaing it!
 * I just have a small problem with the HTML the plugin produces. If I check my 
   website at the W3 HTML Validator ([https://validator.w3.org](https://validator.w3.org))
   I get an error message:
    **“Error: Element div not allowed as child of element
   span in this context.”**
 * If I look at the source code the problem seems to be that the div
    `<div style
   ="display: none;" itemprop="aggregateRating" itemscope itemtype="http://schema.
   org/AggregateRating">`
 * is placed in the span element
    `<span id="post-ratings-8" class="post-ratings"
   itemscope itemtype="http://schema.org/Article" data-nonce="b343faef26">`
 * The Validator locates the error in the code that is generated by the plugin and
   on sites where I haven’t included the ratings I get no such error. So I am pretty
   sure the flawed HTML is generated by the plugin.
 * Anyone else experiencing this problem?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [oritzio](https://wordpress.org/support/users/oritzio/)
 * (@oritzio)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/invalid-html-generated-by-plugin/#post-8153533)
 * What is the doctype that you’re using?
 * try to use this one:
 *     ```
       <!DOCTYPE html>
       <html xmlns="http://www.w3.org/1999/xhtml" itemscope itemtype="http://schema.org/WebPage">
       ```
   
 *  Thread Starter [cecil1654](https://wordpress.org/support/users/cecil1654/)
 * (@cecil1654)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/invalid-html-generated-by-plugin/#post-8158221)
 * I am using the standard HTML5 doctype
    `<!doctype html>`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Invalid HTML generated by plugin?’ is closed to new replies.

 * ![](https://ps.w.org/wp-postratings/assets/icon.svg?rev=978014)
 * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postratings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postratings/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postratings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postratings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postratings/reviews/)

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)

 * 2 replies
 * 2 participants
 * Last reply from: [cecil1654](https://wordpress.org/support/users/cecil1654/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/invalid-html-generated-by-plugin/#post-8158221)
 * Status: not resolved