Title: Block Markup with theme.json
Last modified: March 6, 2023

---

# Block Markup with theme.json

 *  [subatomicdan](https://wordpress.org/support/users/subatomicdan/)
 * (@subatomicdan)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/block-markup-with-theme-json/)
 * There seems to be some markup changes when using a `theme.json` file. For example
   when `wp-block-image` align classes are applied, they no longer have a wrapper
   class. I.e. the “alignleft” class will be added directly to the `wp-block-image`
   element.
 * This never used to be the case. It used to be wrapped inside a `div` with the`
   figure` element nested, and the align class added to that instead, which made
   it easier to align the block properly with CSS.
 * Is there anyway to re-add this or revert it without removing the `theme.json`
   file?

Viewing 1 replies (of 1 total)

 *  [Billy Carter](https://wordpress.org/support/users/billycarter/)
 * (@billycarter)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/block-markup-with-theme-json/#post-16551951)
 * modifying the theme.json file to include a wrapper div around the wp-block-image
   element may be the most elegant solution, but custom CSS could also work if you’re
   unable to modify the theme.json file. I fixed this for my client in the past.
 * However, the best solution will depend on your specific use case and how your
   theme is set up.

Viewing 1 replies (of 1 total)

The topic ‘Block Markup with theme.json’ is closed to new replies.

## Tags

 * [alignment](https://wordpress.org/support/topic-tag/alignment/)
 * [blocks](https://wordpress.org/support/topic-tag/blocks/)
 * [theme.json](https://wordpress.org/support/topic-tag/theme-json/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Billy Carter](https://wordpress.org/support/users/billycarter/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/block-markup-with-theme-json/#post-16551951)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
