Content module
HTML block
Custom HTML with a live preview in the editor.
Overview
The HTML block lets you paste your own HTML — an embed code, a small widget or a custom layout — and switch between editing the code and a live Preview. It has the plugin’s spacing and styling controls, so it fits into your design.
At a glance
- Block name
wpbb/html- Module
- Content
- Find it by searching
- HTML
- Loads JavaScript on the site
- No
When and why to use it
- Embed codes from other services (newsletter forms, booking widgets).
- Small bits of custom markup.
Example scenarios
- Newsletter: paste the embed code from your email marketing service.
How to add the HTML block
- Open the editor. In your WordPress dashboard go to Pages (or Posts) and click the page you want to edit, or click Add New. For headers, footers and templates, use Appearance → Editor (block themes).
- Add a new block. Click the blue + (Block Inserter) button in the top-left corner, or the small + that appears where you want the block. You can also type / on an empty line.
- Search for the block. Type HTML in the search field. Brigade Blocks appear in the Brigade Blocks category and show the coral block icon.
- Insert it. Click HTML in the results. The block appears with an empty code editor.
- Configure the content. Edit the text directly on the block, then open the Settings tab (gear icon) in the right-hand sidebar for the options described below. If the sidebar is hidden, click the gear icon in the top-right corner.
- Customise the design. Switch to the Styles tab (half-filled circle icon) to change colours, spacing, borders and more — see Design & styling.
- Save or publish. Click Save draft to keep working later, Preview to check it, or Publish / Update to make it live.
Content settings
You set up this block in two places: on the block itself in the editor, and in the Settings tab (gear icon) of the sidebar on the right. Every option is listed below, with its default value.
On the block (in the editor canvas)
HTML
- What it does
- Your HTML code.
- What to enter or choose
- Valid HTML.
- Default
- Empty
- How to use it
- Click in the code area and type or paste. Use the toolbar buttons to switch between HTML and Preview.
- When to use it
- For markup no other block provides.
- Example
<div class="notice">Free shipping this week!</div>- Result
- Your HTML appears on the site as written.
- Good to know
- If your account cannot publish unfiltered HTML (for example Authors and Editors on multisite), scripts and other unsafe markup are removed when you save, and the editor tells you so. Empty blocks are not shown.
Block toolbar
HTML / Preview
- What it does
- Switches between editing the code and seeing the result.
- What to enter or choose
- Click HTML or Preview.
- How to use it
- Select the block; the button is in the toolbar that appears above it.
- Example
- Preview to check an embed.
- Result
- The canvas shows the code or the rendered result.
Design & styling
Select the block, open the Styles tab in the settings sidebar (the half-filled circle icon next to the gear) and use the three pickers at the top of the Style panel:
- Element — which part of the block to style.
- State — Normal, or a state such as Hover (only the states the part supports are offered).
- Device — Desktop, Tablet or Mobile, for values that can differ per screen size.
Only panels that make sense for the chosen part and state are shown. The full meaning of every control is in the Styling Controls guide; below is exactly what HTML offers.
Element: Block
The wrapper around your HTML.
| Panel | Control | Per device | Available in states |
|---|---|---|---|
| Background | Type | — | Normal |
| Color / Gradient | — | Normal | |
| Image | — | Normal | |
| Border | Border type | — | Normal |
| Border | — | Normal | |
| Radius | Yes | Normal | |
| Box Shadow | Remove shadow | — | Normal |
| Shadow layers | — | Normal | |
| Spacing | Margin | Yes | Normal |
| Padding | Yes | Normal | |
| Sizing | Width | Yes | Normal |
| Max width | Yes | Normal | |
| Height | Yes | Normal | |
| Min width / Min height / Max height | Yes | Normal | |
| Block alignment | Yes | Normal | |
| Position | Position | Yes | Normal |
| Top / Right / Bottom / Left | Yes | Normal | |
| Z-index | Yes | Normal | |
| Overflow | Yes | Normal | |
| Transform | Move X / Move Y | — | Normal |
| Scale X / Scale Y | — | Normal | |
| Rotate (°), Rotate X (°), Rotate Y (°) | — | Normal | |
| Skew X (°) / Skew Y (°) | — | Normal | |
| Effects | Opacity (%) | Yes | Normal |
| State transition (ms) | — | Normal | |
| Timing | — | Normal | |
| Visibility | Show on Desktop / Tablet / Mobile | — | Normal |
States: Normal only.
Responsive settings
Brigade Blocks uses three screen sizes: Desktop (wider than 1023px), Tablet (600–1023px) and Mobile (599px and narrower). Tablet and Mobile values are optional: when empty, the value of the next larger screen is used.
In the Styles tab, pick the Device first; these controls can then have a different value for that screen size: Radius, Margin, Padding, Width, Max width, Height, Min width / Min height / Max height, Block alignment, Position, Top / Right / Bottom / Left, Z-index, Overflow, Opacity (%).
The Visibility panel (Styles tab, Normal state) can hide the block entirely on Desktop, Tablet or Mobile.
Advanced options
- HTML anchor (Advanced section of the Settings tab) — a unique name such as
pricing, so you can link straight to this block with#pricingat the end of the page address (for example from a menu). - Additional CSS class(es) (Advanced section) — for custom CSS from your theme or the Site Editor. Separate several classes with spaces.
- Custom attributes (Advanced section) — add
data-*,title,aria-label,aria-describedby,langordirattributes. See Custom attributes. - State transition (Styles tab → Effects, Normal state) — how smoothly hover and focus styles animate.
How it works on your site
Your HTML exactly as saved (after WordPress’s safety filter for users without the unfiltered_html capability).
Accessibility
- Code you paste is not checked for accessibility — make sure it has proper labels, headings and alt text.
Limitations and notes
- Scripts only work for users allowed to publish unfiltered HTML (usually Administrators on single sites).
- Invalid HTML can break the page layout.