Improve your email program with this HTML Coding Guide.
What are best practices for writing HTML? We have compiled many here! Find what to do or not to do in the left column and see how that benefits your emails in the right column.
| Code HTML emails as a single Web page with the basic <HTML>, <HEAD>, and <BODY> tags. | Ensures your content will display as intended. |
| Make sure all tags have supporting closing tags </>. | Ensures your content will display as intended. |
| Use only the ASCII character set. | Characters outside the ASCII character set can sometimes be translated to unintended characters; i.e. Microsoft Word's "smart" apostrophe ( ' ) may display as ( ’ ). |
| Use HTML tables for the design layout. | Free form code without tables can shift in transit. |
| All HTML code should be contained in one outside border table. | Using one outside border table ensures inside tables don't move. |
| If you use CSS, include the <style> element in your HTML file between the <BODY> tags. Do not link to an external style sheet. | Not all email clients support CSS. Inline code is best practice. |
| Keep emails a fixed width of between 550-650 pixels. | This prevents recipients from having to scroll horizontally. |
| For background colors, place the content within a table set to that color. | Since background colors are set inside the <body> tag, they will be stripped from your code. |
| Use image ALT tags. | Recipients with images blocked can see your intent. |
| Animated gif files are acceptable, but be wary. Have the first frame work as a stand alone image in case the animation doesn't run. | Animated gif files are not universally supported; i.e. Outlook 2007 does not support. |
| Use only universally supported fonts. | The actual font displayed must be on the recipient machine. |
| Do not use CSS for positioning. | Not all email clients support positioning. |
| Do not use JavaScript. | Receiving email clients may strip out or disable script code. |
| Do not use Flash. | Receiving email clients may strip out or disable script code. |
| Do not use canvas background images. | Not all email clients support canvas images. |
| Do not create long lines of HTML code. | They may break or be rejected by receiving email clients. |
| Do not apply attributes to the <BODY> tag. | Receiving email clients normally strip out or disable the <BODY> tag. |
| Do not embed images in the email - link images to a hosted web site. | Receiving email clients do not display embedded images. |
| Do not use forms such as surveys - link forms to a hosted web site. | Forms are not supported by many email clients. |
| Beware of using white as a font color (#FFFFFF). | It cannot be seen if your background fails to appear. |





