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.
Note that the following HTML tags will be removed for compatibility:
- Input, Select, Button and Textarea Elements
- Embedded Videos
There are a few different versions of HTML. The common version these days is HTML5. XHTML is a "strictly" written language, which leaves less room for mistakes.
The Email Builder itself renders in HTML5, but the final sent email or when looking at the preview, the email will render in XHTML. Therefore, the HTML block is really an XHTML block.
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:
Only < and & are strictly illegal in XML, but it is a good habit to replace > with > 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):
Helpful tools to clean code:
Paste your code there, and click on "fix IT" this will fix any small errors in the code, and you can use the fixed code in the element, and the errors should be fixed. http://fixmyhtml.com/
HTML To XHTML Code Converter:
Any links we provide from non-Infusionsoft sites or information about non-Infusionsoft products or services are provided as a courtesy and should not be construed as an endorsement by Infusionsoft.