I have a wordpress theme with the following code sample:

'before_title'   => '<h3 class="widget-title"><div class="title-text">',
'after_title'    => '</div><div class="widget-line"></div></h3>',

https://validator.w3.org/nu/ reports the following error:

Error: Element div not allowed as child of element h3 in this context.

I’m not sure how to fix the error without breaking the theme’s design.

Thanks.

Read more here: Error: Element div not allowed as child of element h3 in this context


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: