title: Drupal theming $page['content']
body: <p>I'm new to Drupal and I've not been able to find an answer to this anywhere on the internet, or even the broad category of what I should be learning to understand how this works. </p>
  
  <p>In my page template file, I see something like this:</p>
  
  <pre><code>  &lt;section id="content" class="span&lt;?php print $content_cols ?&gt;"&gt;
      &lt;?php print render($page['content']) ?&gt;
    &lt;/section&gt;
  </code></pre>
  
  <p>What gets printed out is something like this monstrosity:</p>
  
  <pre><code>&lt;section id="content" class="span9"&gt;
  &lt;div class="region region-content"&gt;
    &lt;div id="block-system-main" class="block block-system"&gt;
      &lt;div class="content"&gt;
        &lt;div id="node-46" class="node node-article node-promoted clearfix" about="/node/46" typeof="sioc:Item foaf:Document"&gt;
          &lt;div class="submitted"&gt;
            &lt;span property="dc:date dc:created" content="2013-04-03T04:17:33+11:00" datatype="xsd:dateTime" rel="sioc:has_creator"&gt;Submitted by &lt;a href="/user/1" title="View user profile." class="username" xml:lang="" about="/user/1" typeof="sioc:UserAccount" property="foaf:name"&gt;jimjo&lt;/a&gt; on Wed, 04/03/2013 - 04:17&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="content"&gt;
            &lt;div class="field field-name-field-image field-type-image field-label-hidden"&gt;
              &lt;div class="field-items"&gt;
                &lt;div class="field-item even" rel="og:image rdfs:seeAlso" resource="http://localhost:8888/sites/default/files/styles/large/public/field/image/imagefield_q6bw6x.png?itok=RfIKEaZX"&gt;
                  &lt;img typeof="foaf:Image" src="http://localhost:8888/sites/default/files/styles/large/public/field/image/imagefield_q6bw6x.png?itok=RfIKEaZX" width="422" height="197" alt="Enim incassum letalis mauris neo praesent quia rusticus venio vero." title="Brevitas esse qui ratis volutpat ymo."&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;
              &lt;div class="field-items"&gt;
                &lt;div class="field-item even" property="content:encoded"&gt;
                  &lt;p&gt;
                    ARTICLE CONTENT GOES HERE
                  &lt;/p&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>I want to edit the way that <code>$page['content']</code> renders, so I can have more control over class names (and maybe weed out some unnecessary divs). However, I can't figure out a way to control this output. </p>
  
  <p>What's the best way to do this? With a custom template file? Is there somewhere I can see the markup the Drupal is using to create <code>$page['content']</code> so that I can use that as a guide and make some changes to it?</p>