Title: How To Edit Code Block HTML?
Last modified: December 11, 2020

---

# How To Edit Code Block HTML?

 *  Resolved [manas12](https://wordpress.org/support/users/manas12/)
 * (@manas12)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/)
 * Hi,
 * So I want to add a wrapper for an ads code block, which means I have to edit 
   the code block HTML. Where can I edit the HTML?
 * Thanks in advance.
 * Best regards,
    Muhammad Anas

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13776105)
 * Not sure if I understanf your question.
 * You can simply add a wrapper to your code.
 *  Thread Starter [manas12](https://wordpress.org/support/users/manas12/)
 * (@manas12)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13777578)
 * I am sorry I didn’t make it so clear.
    So I want to make a wrapper to an ads 
   block in HTML. The block has a code like this:
 *     ```
       <div="code-block code-block-8">
       ...
       </div>
       ```
   
 * And I want to add another div tag above it so it would be like this:
 *     ```
       <div="myAds">
       <div="code-block code-block-8">
       ...
       </div>
       </div>
       ```
   
 * Could I do that? And how?
    Thanks
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13777602)
 * If it is only like listed above then set alignment to `No wrapping` and set the
   code you would like to use.
 * However, the Ad Inserter wrapping div contains also classes and attributes for
   cleint-side functions.
 * But why would you like an additional wrapping div?
 *  Thread Starter [manas12](https://wordpress.org/support/users/manas12/)
 * (@manas12)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13777941)
 * I want to optimize and reduce [my site’s](https://pendidikanpedia.com/teks-eksposisi/contoh/)
   Cumulative Layout Shift. The CLS is caused by one adsense unit, that on viewport
   is. The ads unit is responsive.
 * When the site is still loading the ads only takes around 50px spaces, but when
   the site is fully loaded the ads will take up to 250px spaces and pushes the 
   other content below.
 * So I have to define the ads fixed height to remove the CLS issue. Perhaps you
   can help me with this issue?
    -  This reply was modified 5 years, 5 months ago by [manas12](https://wordpress.org/support/users/manas12/).
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13777996)
 * You can define ad height using custom CSS and reserve ad space, for example, 
   add this code to the CSS:
    [https://adinserter.pro/documentation/alignments-and-styles#custom-css](https://adinserter.pro/documentation/alignments-and-styles#custom-css)
 * `height: 300px;`
 * You can also use block **Height** setting:
    [https://adinserter.pro/documentation/additional-block-settings#display](https://adinserter.pro/documentation/additional-block-settings#display)
 * This way the layout will not shift when the block is inserted.

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

The topic ‘How To Edit Code Block HTML?’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * 5 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/how-to-edit-code-block-html/#post-13777996)
 * Status: resolved