Title: h1 inside span element Validator Issues
Last modified: October 14, 2021

---

# h1 inside span element Validator Issues

 *  [kcicodingmgr1](https://wordpress.org/support/users/kcicodingmgr1/)
 * (@kcicodingmgr1)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/h1-inside-span-element-validator-issues/)
 * Hello,
 * I’m working through the errors in w3 Validator and came accross a specific error
   for each page.
 * ” Element h1 not allowed as child of element span in this context. ”
 * The line it is referencing is the title header on every page:
    <span><h1>Resident
   Login</h1></span> </div>
 * I need to find where in the code this is so that I can replace all of these spans
   with divs since you cannot have a block element inside of an inline element.

Viewing 1 replies (of 1 total)

 *  Thread Starter [kcicodingmgr1](https://wordpress.org/support/users/kcicodingmgr1/)
 * (@kcicodingmgr1)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/h1-inside-span-element-validator-issues/#post-14974746)
 * After hours finally found the mistake in the template code:
 * Go to template-functions.php file and change the echo span(s) to be div instead
   of span.
 * echo “<span><” . $atts[‘tag’] . “>” . $title . “</” . $atts[‘tag’] . “></span
   >”;

Viewing 1 replies (of 1 total)

The topic ‘h1 inside span element Validator Issues’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/calliope/1.0.64/screenshot.jpg)
 * Calliope
 * [Support Threads](https://wordpress.org/support/theme/calliope/)
 * [Active Topics](https://wordpress.org/support/theme/calliope/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/calliope/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/calliope/reviews/)

## Tags

 * [divs](https://wordpress.org/support/topic-tag/divs/)
 * [H1](https://wordpress.org/support/topic-tag/h1/)
 * [validator](https://wordpress.org/support/topic-tag/validator/)
 * [w3](https://wordpress.org/support/topic-tag/w3/)

 * 1 reply
 * 1 participant
 * Last reply from: [kcicodingmgr1](https://wordpress.org/support/users/kcicodingmgr1/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/h1-inside-span-element-validator-issues/#post-14974746)
 * Status: not resolved