How to Add ID for Block in WordPress Gutenberg?

WordPress Gutenberg blocks do not support element ID in block setting. Users need to add ID manually in the block element.

Following are steps to add ID for block in WordPress Gutenberg. You can apply these steps for all block elements. For example, heading, paragraph, anchor etc.,

  1. Add block element in post content.
  2. Click three dot icon to open block options and choose “Edit as HTML”.
  3. Manually add ID for block element.
  4. Again click three dot icon to open block options and choose “Edit visually”.

Next, following are visual reference images for the above steps.

Edit as HTML option - WordPress Gutenberg
Edit as HTML option – WordPress Gutenberg

Manually add ID for block element
Manually add ID for block element

Edit visually - WordPress Gutenberg
Edit visually – WordPress Gutenberg

At Last,

Hope, these guide helpful for you and gave you complete idea about set ID for WordPress blocks.