Overview
What It's For
The Heading block is a flexible, design-aware alternative to WordPress's built-in heading block. Use it when a heading needs more than plain text — for example, when it must carry a background image, sit on a dark-themed section, align differently at different screen sizes, or be styled visually as one heading level while remaining semantically another. It renders as a standard HTML heading element (<h1>–<h6>), paragraph, or span on the front end, wrapped with full background, spacing, and layout controls.
When to Use It
Reach for Heading instead of the core heading block whenever the design calls for a heading that is also a styled container — one that might have a background color or image behind it, needs responsive text alignment, or requires precise margin and padding control independent of the surrounding layout. It also solves the common SEO/accessibility conflict between semantic level and visual size: you can output an <h2> in the DOM while making it look exactly like an <h4> (or a bold <h1>, or a subtitle) without touching CSS or code.
Key Capabilities
- Independent semantic tag and visual style — choose any heading level (
H1–H6),P, orSpanfor the HTML output, then separately choose how it looks from a full range of heading styles, strong variants, caption variants, and a subtitle style - Responsive text alignment — set text alignment independently for the base (mobile) breakpoint, 576 px and up, 782 px and up, and 992 px and up
- Full background control — solid color, gradient, or background image with configurable size (cover/contain or exact width/height), position (preset or fine-tuned with anchor + offset), blend mode, and repeat
- Light/dark theme toggle — switches the heading's color context so text and labels remain legible on dark backgrounds
- Granular spacing — padding and margin controls for all four sides individually (or globally), using the theme's spacing scale; toggling "Fine Tune" unlocks per-side overrides
- HTML anchor — attach a URL-friendly anchor ID directly to the heading element for in-page navigation links
- Overflow and Z-Index — control CSS overflow behavior and stacking order when the heading is layered with other blocks
- Hide Block — conditionally suppress the heading from the front end without deleting it from the editor
DOM Structure
<h{headingTag} class="{headingClass} fc-heading outer-wrapper {textAlign-class} {textAlignSmUp-class} {textAlignMdUp-class} {textAlignLgUp-class} <!-- dark-theme class when 'Theme' is 'Dark' -->" id="{anchor}" style="{background-styles} {spacing-styles} {overflow} {z-index} <!-- display:none when 'Hide Block' is checked -->">
<!-- when background image is set AND 'Display as img tag' is enabled -->
<img src="{bg-image}" class="bg-image" />
<span class="overlay" style="{overlay-styles}"></span>
<!-- InnerBlocks content: one or more fc-blocks/heading-line child blocks -->
{inner-blocks-content}
</h{headingTag}>DOM Notes
No dynamic regions.
Technical Documentation
Block Settings
All settings below are found in the block's sidebar inspector. Panels are collapsed by default unless noted.
Heading Tag
- Attribute:
headingTag - Type: Single-select dropdown
- Default:
h2 - Panel: Appearance (open by default)
What it controls — Sets the actual HTML element rendered on the front end. Choosing h1–h6 outputs a semantic heading element at that level; choosing P outputs a <p> tag; choosing Span outputs a <span> tag.
Options:
- H1 →
<h1> - H2 →
<h2> - H3 →
<h3> - H4 →
<h4> - H5 →
<h5> - H6 →
<h6> - P →
<p> - Span →
<span>
Notes — This controls the semantic tag only. The visual size/style of the heading is controlled independently via Heading Class below, allowing semantic and visual levels to differ.
Heading Class
- Attribute:
headingClass - Type: Single-select dropdown
- Default:
inherit - Panel: Appearance (open by default)
What it controls — Applies a CSS class to the heading element that controls its visual appearance. Allows the rendered element to look like a different heading level (or a styled variant) without changing the semantic HTML tag. For example, you can use an <h2> tag but style it to look like an H4, or apply a "Strong" or "Caption" variant.
Options:
- H1 through H6 — visual size matching that heading level
- H1 Strong through H6 Strong — bold/weighted variant of each heading level
- H1 Caption through H6 Caption — caption-style variant of each heading level
- Sub Title — a subtitle typographic style
- Inherit — no additional class applied; inherits styling from the tag itself or surrounding context
Text Align (Base)
- Attribute:
textAlign - Type: Single-select dropdown
- Default:
left - Panel: Text Alignment
What it controls — Sets the text alignment at the base (mobile-first) breakpoint. Applies to all screen widths unless overridden by a breakpoint-specific alignment setting below.
Options:
- Left
- Center
- Right
Text Align (576px & Up)
- Attribute:
textAlignSmUp - Type: Single-select dropdown
- Default:
inherit - Panel: Text Alignment
What it controls — Overrides text alignment at the small breakpoint (576px and wider). When set to Inherit, the base alignment applies at this breakpoint.
Options:
- Inherit — uses the base or parent alignment
- Left
- Center
- Right
Text Align (782px & Up)
- Attribute:
textAlignMdUp - Type: Single-select dropdown
- Default:
inherit - Panel: Text Alignment
What it controls — Overrides text alignment at the medium breakpoint (782px and wider). When set to Inherit, the next lower breakpoint's alignment applies.
Options:
- Inherit — uses the base or lower breakpoint alignment
- Left
- Center
- Right
Text Align (992px & Up)
- Attribute:
textAlignLgUp - Type: Single-select dropdown
- Default:
inherit - Panel: Text Alignment
What it controls — Overrides text alignment at the large breakpoint (992px and wider). When set to Inherit, the next lower breakpoint's alignment applies.
Options:
- Inherit — uses the base or lower breakpoint alignment
- Left
- Center
- Right
Block Settings — Background Panel
The Background panel is provided by the shared BackgroundControls component and appears as a collapsible "Background" panel in the inspector.
Theme
- Attribute:
background(index 0) - Type: Radio buttons
- Default:
light - Panel: Background
What it controls — Switches the block between a light and dark color theme. The dark theme inverts text colors inside the heading block to maintain readable contrast on dark backgrounds.
Options:
- Light — default text colors
- Dark — text colors inverted; applies a
dark-themeCSS class to the wrapper element
Background Color Type
- Attribute:
background(index 1) - Type: Radio buttons
- Default:
solid - Panel: Background
What it controls — Determines whether the block background uses a flat solid color or a CSS gradient. Affects which color picker is shown below.
Options:
- Solid — reveals the Background Color palette picker
- Gradient — reveals the Gradient Picker; background-blend-mode is automatically forced to "overlay" when a gradient is used
Background Color
- Attribute:
background(index 2) - Type: Color picker (palette with alpha support)
- Default: none
- Panel: Background
What it controls — Sets the solid background color of the heading block. Color choices are drawn from the theme's defined color palette, with full opacity control via alpha slider.
Conditional Logic — Visible only when Background Color Type is set to Solid.
Background Gradient
- Attribute:
background(index 3) - Type: Gradient picker
- Default: none
- Panel: Background
What it controls — Applies a CSS gradient as the block's background. The gradient is rendered as an overlay layer when a background image is also present.
Conditional Logic — Visible only when Background Color Type is set to Gradient.
Background Image
- Attribute:
background(index 4) - Type: Media upload (image)
- Default: none
- Panel: Background
What it controls — Selects an image from the media library to use as the heading block's background. When an image is set, additional size, position, blend mode, and repeat controls appear. A Remove button clears the image.
Fine Tune BG Size
- Attribute:
background(index 5) - Type: Toggle
- Default: off
- Panel: Background
What it controls — Switches between a simple Cover/Contain size preset and manual width/height unit controls for the background image.
Conditional Logic — Visible only when a Background Image is set.
Options:
- Off — shows a Cover / Contain dropdown
- On — shows separate Width and Height unit fields (px, %, em); leaving either blank sets it to
auto
Background Image Size
- Attribute:
background(index 6) - Type: Single-select dropdown
- Default:
cover - Panel: Background
What it controls — Sets the CSS background-size of the background image using a preset value.
Conditional Logic — Visible only when a Background Image is set and Fine Tune BG Size is off.
Options:
- Cover — image covers the full block area
- Contain — image is scaled to fit within the block without cropping
Background Image Width / Height
- Attribute:
background(indices 7 and 8) - Type: Unit control fields (px, %, em)
- Default: blank (
auto) - Panel: Background
What it controls — Sets explicit width and height values for the background image size. Leaving a field blank defaults that dimension to auto.
Conditional Logic — Visible only when a Background Image is set and Fine Tune BG Size is on.
Fine Tune BG Position
- Attribute:
background(index 9) - Type: Toggle
- Default: off
- Panel: Background
What it controls — Switches between a simple Left/Center/Right position preset and manual anchor + offset controls for the background image position.
Conditional Logic — Visible only when a Background Image is set.
Options:
- Off — shows a simple position dropdown (Left, Center, Right)
- On — shows separate horizontal anchor (left/right) with optional offset, and vertical anchor (top/bottom) with optional offset
Background Image Position
- Attribute:
background(index 10) - Type: Single-select dropdown
- Default:
center - Panel: Background
What it controls — Sets the CSS background-position of the background image using a preset.
Conditional Logic — Visible only when a Background Image is set and Fine Tune BG Position is off.
Options:
- Left
- Center
- Right
Horizontal Anchor / Offset and Vertical Anchor / Offset
- Attribute:
background(indices 11–14) - Type: Select dropdowns and unit control fields (px, %, em)
- Default: blank
- Panel: Background
What it controls — Provides precise control over background image position. An anchor (left/right for horizontal; top/bottom for vertical) is chosen first, then an optional numeric offset from that anchor is entered. Leaving an offset blank positions the image at the anchor edge with no offset.
Conditional Logic — Visible only when a Background Image is set and Fine Tune BG Position is on.
Background Image Blend Mode
- Attribute:
background(index 15) - Type: Single-select dropdown
- Default:
overlay - Panel: Background
What it controls — Sets the CSS background-blend-mode controlling how the background image composites with the background color. When set to "overlay," the solid color or gradient is rendered as a separate overlay layer on top of the image rather than blending at the CSS level.
Conditional Logic — Visible only when a Background Image is set and Background Color Type is set to Solid. Hidden when Gradient is selected (blend mode is forced to overlay automatically).
Options: normal, multiply, screen, overlay, darken, lighten
Background Image Repeat
- Attribute:
background(index 16) - Type: Single-select dropdown
- Default:
no-repeat - Panel: Background
What it controls — Controls whether the background image tiles across the block or appears only once.
Conditional Logic — Visible only when a Background Image is set.
Options:
- no-repeat — image appears once
- repeat — image tiles in both directions
Block Settings — Spacing Panel
The Spacing panel is provided by the shared SpacingControls component.
Padding
- Attribute:
spacing(indices 0–5) - Type: Toggle (Fine Tune Padding) + single-select dropdowns
- Default: global padding
inherit - Panel: Spacing
What it controls — Sets the padding (inner space) on the heading block. A global padding value applies equally to all four sides; enabling Fine Tune Padding reveals individual Top, Bottom, Left, and Right controls.
Options (for each padding field):
- Inherit from theme
- None (0)
- Quarter (0.25× base spacing)
- Half (0.5× base spacing)
- BASE (1× base spacing)
- Double (2× base spacing)
- Triple (3× base spacing)
Margin
- Attribute:
spacing(indices 6–11) - Type: Toggle (Fine Tune Margin) + single-select dropdowns
- Default: global margin
inherit - Panel: Spacing
What it controls — Sets the margin (outer space) around the heading block. A global margin value applies equally to all four sides; enabling Fine Tune Margin reveals individual Top, Bottom, Left, and Right controls.
Options (for each margin field): same set as Padding above.
Block Settings — Other Settings Panel
Overflow
- Attribute:
otherSettings(index 0) - Type: Single-select dropdown
- Default:
hidden - Panel: Other Settings
What it controls — Sets the CSS overflow property on the heading block's wrapper element, controlling whether content that extends beyond the block's bounds is clipped, visible, or scrollable.
Options:
- Hidden — content outside the block's boundary is clipped
- Visible — overflowing content is shown
- Scroll — a scrollbar is added when content overflows
HTML Anchor
- Attribute:
otherSettings(index 1) - Type: Text field
- Default: empty
- Panel: Other Settings
What it controls — Sets an id attribute on the rendered heading element, creating a named anchor on the page. This allows the block to be linked to directly via a URL fragment (e.g. page-url/#my-heading). Enter a single word or hyphenated phrase with no spaces.
Hide Block
- Attribute:
otherSettings(index 2) - Type: Checkbox
- Default: unchecked
- Panel: Other Settings
What it controls — When checked, applies display: none to the heading block, hiding it completely on the front end. The block remains in the editor for future use.
Z-Index
- Attribute:
otherSettings(index 3) - Type: Number field (supports shift-step of 10)
- Default: empty
- Panel: Other Settings
What it controls — Sets the CSS z-index on the heading block's wrapper, controlling its stacking order relative to other positioned elements on the page. Useful when layering the heading over or under other blocks.
Cross-Block Relationships
The Heading block requires at least one Heading Line (fc-blocks/heading-line) child block. When inserted, it automatically places one Heading Line block inside it. Additional Heading Line blocks can be added manually; the templateLock is set to false so the inner block area is not locked.
The block reads the first child Heading Line's text content to display a preview in the editor canvas. The actual editable text content lives inside the child Heading Line blocks, not in the Heading block itself.