Hi there,
the HTML Anchor field is a core WordPress field, you will find it for ( almost ) every Block you add to a page.
Whatever value you add in that field will get output to the ID
attribute of the blocks HTML.
eg.
<div id="my-html-anchor-field-value" class="gb-container ....">
And the ID
attribute CANNOT contain a #
– its invalid HTML.
There are a few reasons for this, but the main on is because the #
is used as an general identifier when you for example:
a) reference the ID in a href
attribute eg.
<a href="#my-html-anchor-field-value">My anchor link</a>
b) use it it in a CSS selector hook eg.
#my-html-anchor-field-value {
color: #f00;
}
c) or in any querySelector in Javascript for example.
So don’t add the #
to that field.
You add the #
when you want to reference the HTML element with that ID.