• 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) 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)
  • 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

    (@cecil1654)

    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.