Aelement to create emails and inline CSS to style them. Lets walk through the process below. Download Now 50 Code Templates Free Snippets HTML Email Table Template An HTML email is made up of multiple table elements. Each table element represents a different section of the email including the header body and footer. Below is a very basic HTML email table template. loadinglazy DOCTYPE html html langen head meta httpequivContentType contenttexthtml charsetutf8 meta nameviewport contentwidthdevicewidth titletitle stylestyle head body div idemail stylewidth600px Header table rolepresentation border0 cellspacing0 width100 tr td td tr table Body table rolepresentation border0 cellspacing0 width100 tr td td.
Border0 cellspacing0 width100 tr td td tr table div body Notice there is a div with the id name of email. This div contains three tables each representing the header body and footer of the email. These Digital Marketing Service are the essential building blocks of an HTML email. Using this template you could build out a more complex email like the one shown below. Lets take a closer look at the attributes you can define to add a border background color and other styling to your HTML email. HTML Email Table Attributes In HTML attributes provide additional information about HTML elements. This information can be essential or nonessential and impact the appearance positioning or functionality of an HTML element. Attributes are always found in the opening tag.
HTML element and have the syntax namevalue. Attributes can be written in any order inside the opening tag. Many attributes can be applied to multiple elements. The width attribute for example can be set on an image or table element. However some attributes are unique to certain HTML elements. Tables have their own set of attributes including Role The role attribute must be set to presentation. The presentation role is used to remove semantic meaning from an element and its child elements. This is necessary for table elements in an HTML email because they are only used for layout purposes. Align The align attribute specifies the alignment of a table according to the surrounding text. You can set this attribute.