> For the complete documentation index, see [llms.txt](https://broadcast.presidiocreative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://broadcast.presidiocreative.com/broadcast-v5/header/announcement-bar-settings/custom-code.md).

# Custom code

Use Custom code block to build custom announcement messages with HTML

Broadcast includes a custom code block to help you build customized messages with HTML and inline styles.&#x20;

Build custom announcement messages and use targeting options to customize your promotions completely:

<figure><img src="https://content.gitbook.com/content/j8jzXN4KKXAfQhgbN5lO/blobs/WpYHjxt4XizkYk9WphrK/custom%20code%20block%20for%20abar.jpg" alt=""><figcaption></figcaption></figure>

Example of custom code used in the above image:

```
<p>Custom code using <span style="color: orange; font-weight:900;" >HTML</span>. Build your own custom message block</p>
```

#### Target options

* Broadcast includes target options to help you display custom messages on certain site pages. Use the Target page feature to customize which announcement bar messages are displayed on various pages of your site.&#x20;
* With the Target Referrer feature, you can display custom messages when a customer views your shop from an external marketing campaign.&#x20;
* The Target device feature displays custom announcement bar messages for mobile devices, such as shorter messages and custom longer messages for desktop users.

<figure><img src="https://content.gitbook.com/content/j8jzXN4KKXAfQhgbN5lO/blobs/6IzwR09hNsojTOfUt29m/custom%20code%20targe.jpg" alt=""><figcaption></figcaption></figure>

Learn more about the target options in Broadcast:

{% content-ref url="/pages/rEyGiDYuTifjwSTnPCyp" %}
[Target settings](https://broadcast.presidiocreative.com/broadcast-v5/header/header/target-settings.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://broadcast.presidiocreative.com/broadcast-v5/header/announcement-bar-settings/custom-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
