• https://validator.w3.org/ is throwing the following error:

    Error: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
    
    From line 416, column 6; to line 416, column 71
    
    ipt>?					<style id='wpcf7-62321801c246b-inline-inline-css' type='text/css'>?#wpcf
    
    Contexts in which element style may be used:
    Where metadata content is expected.
    In a noscript element that is a child of a head element.
    Content model for element body:
    Flow content.

    I understand the purpose of this field and that it should indeed be hidden. In the admin, you’ve provided an option to move the CSS into the footer. However, it’s still inserted within the body.

    Perhaps you could consider revising the following:

    includes/honeypot4cf7.php

    // Check if we should move the CSS off the element and into the footer
    	if ( ! empty( $atts['move_inline_css'] ) && $atts['move_inline_css'][0] === 'true' ) {
    		$hp_css = '#' . $wrapper_id . ' {' . $atts['css'] . '}';
    		wp_register_style( $unique_id . '-inline', false );
    		wp_enqueue_style( $unique_id . '-inline' );
    		wp_add_inline_style( $unique_id . '-inline', $hp_css );
    		$el_css = '';
    	} else {
    		$el_css = 'style="' . $atts['css'] . '"';
    	}
  • The topic ‘validator.w3.org Error’ is closed to new replies.