Div around img tag in Drupal 7 I am using Drupal 7 with wysiwyg (7.x-2.0)module and CK editor 3.5.3.6655. I added an image in  a block with link and the CK editor code is 

&lt;p&gt;
    &lt;a class="thickbox" href="example.com"&gt; [[{"type":"media","view_mode":"media_original","fid":"751","attributes":{"alt":"contact","class":"media-image","typeof":"foaf:Image"}}]]&lt;/a&gt;
&lt;/p&gt;


But Drupal is adding some divs around the img tag and the resulting code is 

&lt;div id="block-block-11" class="block block-block"&gt;   
      &lt;div class="content"&gt;
         &lt;p&gt;
            &lt;a class="thickbox" href="example.com"&gt;
                &lt;div class="field field-name-file field-type-file field-label-hidden"&gt;
                    &lt;div class="field-items"&gt;
                        &lt;div class="field-item even"&gt;
                            &lt;span id="styles-0-0" class="styles file-styles original"&gt;
                                &lt;img typeof="foaf:Image" src="path to image.jpg" alt="contact" /&gt;
                            &lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/a&gt;
         &lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;


Then I got the W3C error document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag as div is not allowed inside p and a. How can I solve this?

I added div instead of p but no use.
This is a field themeing issue.  The field.tpl.php API docs and linked source is a good place to start.  The comments on that page also have useful information for you.