Title: header element cannot include other elements?
Last modified: March 17, 2021

---

# header element cannot include other elements?

 *  Resolved [idoc](https://wordpress.org/support/users/idoc/)
 * (@idoc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/element-cannot-include-other-elements/)
 * – PHP 8.0.3
    – WordPress 5.7 – Simply Static 2.1.3
 * I convert static page includes code below by Simply Static but it generate strange
   HTML. Is this code invalid? This issue is not occurred on Simply Static 2.1.0,
   WordPress 5.0.6, PHP 5.3.29.
 * – Original code
 *     ```
       <h5>Header Title
           <p>
               <span class="green">Title1</span> Value1　
               <span class="orange">Title2</span> Value2
           </p>
       </h5>
       ```
   
 * – Converted HTML
 *     ```
       <h5>Header Title</h5>
           <p>
               <span class="green">Title1</span> Value1　
               <span class="orange">Title2</span> Value2
           </p>
       ```
   
    -  This topic was modified 5 years, 2 months ago by [idoc](https://wordpress.org/support/users/idoc/).
    -  This topic was modified 5 years, 2 months ago by [idoc](https://wordpress.org/support/users/idoc/).

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

 *  Plugin Author [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/element-cannot-include-other-elements/#post-14198315)
 * Hey [@idoc](https://wordpress.org/support/users/idoc/),
 * thanks for your report.
 * To be honest, Simply Static isn’t really tested with PHP 8 as of today, but the
   problem should not be the PHP version, it’s more about the markup itself.
 * In the background simpledom (PHP) handles the conversion and included an automatic
   markup fixer (based on some rules of W3C) ,that could be the problem here.
 * Have you checked it with PHP 7?
 *  Thread Starter [idoc](https://wordpress.org/support/users/idoc/)
 * (@idoc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/element-cannot-include-other-elements/#post-14198825)
 * Hi [@patrickposner](https://wordpress.org/support/users/patrickposner/)
 * Thank you for the reply. I retry convert on the environment below but same result.
   –
   WordPress 5.7, PHP 7.2 – WordPress 5.7, PHP 7.4 *Simply Static 2.1.3 require 
   PHP 7.2 so I couldn’t try more older version of PHP.
 * It may behavior of markup fixer changed between PHP 5.0 and PHP 7.2. We’ll change
   our HTML for avoid this issue.

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

The topic ‘header element cannot include other elements?’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [idoc](https://wordpress.org/support/users/idoc/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/element-cannot-include-other-elements/#post-14198825)
 * Status: resolved