HTML Block

You are able to add snippets of HTML code into your email using the HTML block. This guide is going to review the type of code the HTML block accepts.

There are a few different versions of HTML. The common version these days is HTML5, which is considered a "loosely" written language. XHTML is an older version is a "strictly" written language, which leaves less room for mistakes.

The BARD builder itself renders in HTML5, but when sending or looking at the preview, the email will render in XHTML. This is because in HTML5, you don't need to use a self-closing tag (though it's a best practice to do so regardless). In XHTML, however, you do.

Table of Contents:

All XML Elements Must

XHTML Elements Must Always Be Closed

Empty Elements Must Also Be Closed

XHTML Elements Must Be In Lower Case

XHTML Attribute Names Must Be In Lower Case

XML tags are case sensitive. The tag <Letter> is different from the tag <letter>

XML Elements Must be Properly Nested

In HTML, you might see improperly nested elements:

<b><i> This text is bold and italic </b></i>

In XML, all elements must be properly nested within each other:

<b><i> This text is bold and italic </i> </b>

In the example above, "Properly nested" simply means that since the <i> element is opened inside the <b> element, it must be closed inside the <b> element.

Another example is, instead of doing something like:

<img src="w3schools.com/images/w3schools_green.jpg" alt="image">

You would need to actually close the tag as with a /

<img src="w3schools.com/images/w3schools_green.jpg" alt="image"/>

There are five pre-defined entity references in XML:

&lt;

<

less than

&gt;

>

greater than

&amp;

&

ampersand

&apos;

'

apostrophe

&quot;

"

quotation mark

Only < and & are strictly illegal in XML, but it is a good habit to replace > with &gt; as well.

White-space is Preserved in XML

XML does not truncate multiple white-spaces (HTML truncates multiple white-spaces to one single white-space):