The Emarsys Marketing Platform has a built-in template validation engine to help you create syntactically valid templates on your own in the block-based editor (VCE). This helps to ensure that you don't miss any formatting or content issues that could adversely affect your deliverability or your marketing goals.
Contents:
Before you start, please make sure to read our guidelines:
How does it work?
The template validation engine is available in the block-based template editor. When you create a new template or edit an existing one, it checks your HTML code against our guidelines and warns you in real time via a message displayed in the live preview pane if it detects any issues.

Expand the validation warning messages to get a more detailed description of the errors. Each individual error description contains a link that will take you to the frame or block in which the issue has been found so that you can fix it.
As long as there are problems with your template s syntax, you will not be able to use it for campaign creation. On the Templates page, the thumbnail of such templates is marked with an orange exclamation mark and an error message.

Frame errors
When editing the frame of your template, you may run into the following issues and validation messages:
Issue | Error message |
---|---|
Missing tokens. | Error in 'frame'; missing #body# or #style# token. |
Duplicated tokens. | Error in 'frame'; multiple #body# or #style# tokens. |
Misplaced tokens. | Error in 'frame'; unexpected #body# or #style# token. |
Empty frame. | Error in 'frame'; frame is empty. |
The #body# token is nested in the tbody element.* | Error in frame ; unexpected <tbody>. |
* Currently, we do not allow this code combination in the template frame:
...<tbody>
#body#
</tbody>
...
Block errors
When editing the blocks of your template, you may run into the following issues and validation messages:
Issue | Error message |
---|---|
The template has no blocks. | The template does not contain any blocks. |
The template block is empty. | Error in New Block ; missing block root element. |
The template contains a coding error. | The template contains invalid blocks. |
Valid block code combinations
In the block editor, the most common errors are attributable to the use of invalid root elements in the HTML code.
The blocks you add to your template are represented by the #body#
token in the code of your frame. When creating or editing the blocks, you need to consider how the #body#
token is nested in the HTML of the template frame as the parent element of #body#
determines which HTML tags can be the top-level elements, or root elements, in the blocks.
To avoid the block errors related to the use of invalid root elements, follow these basic rules that cover the most common frame structures.
Rule 1
If you choose <body>
as the parent element of the #body#
token in the frame, always use <table>
and/or <div>
as the root element in your blocks.
Frame | Block roots |
---|---|
...<body> #body# </body> ... | <table> <tr> <td>Content 1</td> <td>Content 2</td> </tr> </table> <div> Content3 </div> |
Rule 2
If you choose <center>
as the parent element of the #body#
token in the frame, always use <table>
and/or <div>
as the root element in your blocks.
Frame | Block roots |
---|---|
...<body> ... <center> #body# </center> ... </body> ... | <table> <tr> <td>Content 1</td> <td>Content 2</td> </tr> </table> <div> Content3 </div> |
Rule 3
If you choose <div>
as the parent element of the #body#
token in the frame, always use <table>
and/or <div>
as the root element in your blocks.
Frame | Block roots |
---|---|
...<body> ... <div> #body# </div> ... </body> ... | <table> <tr> <td>Content 1</td> <td>Content 2</td> </tr> </table> <div> Content3 </div> |
Rule 4
If you choose <table>
as the parent element of the #body#
token in the frame, always use <tr>
as the root element in your blocks.
Frame | Block roots |
---|---|
...<body> ... <table> #body# </table> ... </body> ... | <tr> <td width= 10 > </td> </tr> <tr> <td>Content1</td> </tr> <tr> <td width= 10 > </td> </tr> |
Rule 5
If you choose td
as the parent element of the #body#
placeholder in the frame, always use <table>
and/or <div>
as the root element in your blocks.
Frame | Block roots |
---|---|
...<body> ... <table> <tr> <td> #body# </td> </tr> </table> ... </body> ... | <table> <tr> <td>Content 1</td> <td>Content 2</td> </tr> </table> <div> Content3 </div> |