title: WordPress page: Why is <main> tag wrapped by <p> while <div> is not?
body: <p>In WordPress page, the <code>&lt;main&gt;</code> tags are wrapped by <code>&lt;p&gt;</code>s, but <code>&lt;div&gt;</code>s are not.</p>
  
  <p>WordPress 4.7.12</p>
  
  <p><strong>Example 1: Using main tag</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;main&gt;
  &lt;div&gt;this is main&lt;/div&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>results</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p&gt;&lt;main&gt;&lt;/p&gt;
  &lt;div&gt;this is main&lt;/div&gt;
  &lt;p&gt;&lt;/main&gt;&lt;/p&gt;
  </code></pre>
  
  <p><strong>Example 2: Using div#main</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="main"&gt;
  &lt;div&gt;this is main&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>results</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="main"&gt;
  &lt;div&gt;this is main&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>What is the trigger to wrap with <code>&lt;p&gt;</code>?</p>
  
  <p><strong>Remarks</strong></p>
  
  <p>My <code>page.php</code> is below.</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  /**
   * @package WordPress
   * @subpackage Default_Theme
   */
  
  get_header(); ?&gt;
  &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
  &lt;?php remove_filter('the_content', 'wpautop'); ?&gt;
  &lt;?php the_content('&lt;p class="serif"&gt;' . __('Read the rest of this page &amp;raquo;', 'kubrick') . '&lt;/p&gt;'); ?&gt;
  &lt;?php add_filter('the_content', 'wpautop'); ?&gt;
  &lt;?php endwhile; endif; ?&gt;
  
  
  &lt;?php get_footer(); ?&gt;
  </code></pre>