Skip to main content
Data attributes let you embed BeyondWords configuration directly in your HTML. Use them to set content metadata (title, author, publish date), override voices and languages for specific paragraphs, mark images for video, add pauses, insert audio clips, and improve segment detection. They complement content filters. Filters remove whole HTML elements, while data attributes configure how remaining content is interpreted and synthesized.
If you send content via the API, you can set many metadata fields (title, author, publish_date, etc.) directly on the request instead of using global data attributes. Global attributes are most useful when BeyondWords fetches a live page (Magic Embed, RSS Feed Importer page extraction).

How it works

BeyondWords reads data-beyondwords-* attributes from your HTML at different stages of processing. Each attribute belongs to one of three scopes (global, segment, or document), which determines what it affects and where you should place it. Attributes must be on valid HTML elements. Plaintext content without HTML tags can’t carry data attributes.

Attribute scopes

Think of the three scopes as three layers: Global attributes answer: what is this article? They map to content-item fields: title, author, publish date, whether the widget should load, default voices for title/body/summary sections, and the single feature image for videos and share pages. Segment attributes answer: how should this part of the article be synthesized or played back? They attach to specific HTML elements and flow into individual audio/video segments: a different voice for one paragraph, a pause mid-sentence, a marker for playback from paragraphs, an in-article image for video, or a pre-recorded audio clip. Document attributes answer: how should BeyondWords process this HTML file? The only document-scoped attribute today skips dashboard content filters for that HTML. This is useful when you need the raw markup to pass through unchanged.

Global vs segment: a concrete example

Both scopes can set voices, but they work at different levels:
Similarly, data-beyondwords-feature-image (global) picks one hero image for the content item, while data-beyondwords-image (segment) marks individual images inside the article for video segments.

When to use data attributes

Regenerate or re-publish content after adding or changing attributes in your HTML template.

Attribute reference

Each attribute belongs to a scope: global, segment, or document.

Global metadata attributes

Global attributes set content-item-level metadata and defaults. See Attribute scopes for how they differ from segment and document attributes. Add them to any element in your HTML, commonly on <body>, <article>, or a wrapper <div>. BeyondWords uses the first matching element in the document for each attribute. These are extracted automatically when BeyondWords fetches a live URL (Magic Embed, RSS page extraction). When sending HTML via the API, prefer the API’s title, author, and other metadata fields; use global attributes when page fetch is your ingestion path or you need to override extracted values.

Title

Author

Publish date

ISO 8601 datetime. If the date is in the future, the widget won’t load until that time. Include a timezone suffix (Z or +01:00); if omitted, UTC is assumed. If the attribute is missing, Magic Embed uses the page’s publish date metadata instead, such as article:published_time. If your project has an Earliest publish date, this date decides whether the page is imported.

Published

Boolean ("true" or "false"). If false, the widget will not load regardless of publish date. Content is still generated and visible in the project dashboard.

Ads enabled

Boolean ("true" or "false").

Title, body, and summary voice

Set default voices by section using voice IDs from Audio → Preferences → Voices in your project dashboard. See voices.
If not specified, project default voices are used.

Article language

Default synthesis language as a locale code (e.g., en_GB, en_US). If not specified, the project default language is used.

Feature image

Marks the content-level feature image, used in videos and on shareable play pages. Set data-beyondwords-feature-image="true" on the chosen <img>. BeyondWords uses the first matching image’s src (resolved to an absolute URL when possible).
This is different from data-beyondwords-image (see below), which marks images within the article body for video segments.

Segment attributes

Segment attributes control per-segment behavior: how individual paragraphs, headings, images, and audio clips are synthesized and identified in the widget. See Attribute scopes for how they differ from global and document attributes. Set them on specific HTML elements. Nested elements inherit the nearest ancestor’s value for voice and language.

Voice override

Override the voice for a section using a voice ID. Child elements inherit unless they set their own override.

Language override

Override the language for a section using a locale code.

Segment markers

Markers identify segments on your page for widget features such as paragraph highlighting and playback from paragraphs. BeyondWords extracts markers from your HTML during processing; you can also add them manually. Use stable, unique values. We recommend UUIDs. See segment detection for full guidance.

Pauses

Insert a verbal pause at a specific point in a paragraph. Value is a number in seconds (maximum 3), with up to one decimal place. An optional s suffix is accepted (1.0, 1.2s).
You can also use a <time> element instead of <span>.

Image markers (video)

Mark images within the article body for video generation. Unlike data-beyondwords-feature-image, this applies per image segment in the article, not the content-level hero image.
Set data-beyondwords-image="false" to exclude an image that would otherwise be picked up automatically.

Audio

Insert a pre-recorded audio clip into auto_segment content, for example, a sting between articles. Set data-beyondwords-audio="true" on an element that has a public src (typically <audio>). During processing, that element becomes an audio segment between the surrounding text. An <audio> element with a src but without the attribute is ignored. src can be any publicly reachable HTTPS URL, or a URL returned by Upload file. After the content item reaches processed, playback uses BeyondWords CDN assets. Keep the original URL available if the item is regenerated.
If your project uses include content filters, add an include rule for audio so the element isn’t removed before processing. For manual_segment content, insert audio in the editor.

Advanced

Document-scoped attributes affect processing of the whole HTML file, not metadata or individual segments. See Attribute scopes.

Skip content filters

Set on the root <html> element to bypass content filters for that HTML document. BeyondWords still removes script, style, and HTML comments.
Use sparingly, only when you need the raw HTML to pass through unchanged by dashboard filters (for example, highly controlled CMS output). You can also target elements with data-* attributes using a Data content filter. For example, exclude matches elements with a data-exclude attribute.

Example: Magic Embed page

FAQs

Global attributes apply to the whole content item: one title, one author, one feature image, and default voices per section type. Segment attributes apply to individual parts of the HTML as they are split into audio/video segments, e.g., a voice override on one paragraph, a pause mid-sentence, or a marker for playback from paragraphs. Global attributes use the first matching element in the document; segment attributes inherit from ancestor elements. See Attribute scopes.
If you control a backend integration, set title, author, publish_date, and similar fields on the API request directly, since these are global metadata fields. Use global data attributes when BeyondWords fetches your page (Magic Embed, RSS page extraction) and you need to override what automatic extraction would infer. Segment attributes (voice overrides, pauses, markers) have no API equivalent, so they belong in your HTML.
data-beyondwords-feature-image="true" marks the single content-level hero image (videos, share pages). data-beyondwords-image="true" marks individual in-article images as segments for video generation. A page can have one feature image and multiple image markers.
Usually not. BeyondWords extracts markers from your HTML during processing and the widget uses them for highlighting and playback from paragraphs. Add markers manually if segment detection isn’t working on your site. Use stable UUIDs and keep them consistent across page updates.
Yes, they solve different problems. Content filters remove whole HTML elements before extraction. Data attributes configure metadata and per-segment behavior on the elements that remain. Use both together for best results.
Go to Audio → Preferences → Voices. Each voice has a numeric ID you can copy into data-beyondwords-*-voice-id attributes.

Get help

If you encounter issues or have questions, contact support. Include a sample of your HTML and which attributes you have configured.