New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating your tables for the email

From: Creating an HTML Email Newsletter

Video: Creating your tables for the email

In the last video we extracted color information dimensions and other details and wound up with a worksheet that look something like this. To start coding we'll have in our interface a blank HTML file, we have our prep code file for HTML; we've added the doc type, body etcetera. We've got our CSS prep code, we have our email copy to save us a lot of typing, and for our discussion later when we add the background image we have our VML code for Outlook 2007 and Outlook 2010.

Creating your tables for the email

In the last video we extracted color information dimensions and other details and wound up with a worksheet that look something like this. To start coding we'll have in our interface a blank HTML file, we have our prep code file for HTML; we've added the doc type, body etcetera. We've got our CSS prep code, we have our email copy to save us a lot of typing, and for our discussion later when we add the background image we have our VML code for Outlook 2007 and Outlook 2010.

So we'll start with our email invitation. We're going to start off very simply. No big scary leaps, we're going to add code in layers not all at once. The first step is to go to our HTML prep code, highlight, Ctrl+C or Command+C to copy, Ctrl+V or Command+V to paste. What I do want to add is an HTML comment that tells us this is our Wrapper, our pseudo BODY tag table.

As we add layers and layers of code these comments will help us understand where things begin and where they end. It will save us a lot of time. I'll copy and paste and this is the close Wrapper pseudo BODY table. We have our Wrapper pseudo BODY table, we need another table for the background border and for the content, and in addition we're going to need to create these very simple tables at the top and bottom for links.

Here's how we code all of these tables. We'll highlight, Ctrl+C or Command+C to copy, Ctrl+V or Command+V to paste, we'll indent, two stops. This minor table handles the view to web version link, I mentioned of the Unsubscribe link at the bottom of the email and any other data of that sort. So we'll call this basic links. Next, we'll create our background table.

I'll highlight, copy, paste, we'll type Background table and the other major table I'm going to do here is for the bottom links, the unsubscribe links. I'll highlight, copy, paste. As I mentioned earlier we want these tables to manage our links to ensure everything is centered.

Now let's go back to our background table, we'll highlight, copy, and paste. We'll indent this table, two stops, and this is our content table. We'll go back to our original design and you see that in our content table we have several rows. We have a row that holds our logo image, a row for the copy, a row for the olive branch image, and we have two rows for the footer.

So let's create those rows. This row will be for the logo. We carefully select just the table row, not the entire table, Ctrl+C or Command+C to copy, Ctrl+V or Command+V to paste. This will be our copy area. Next we need an area for the olive branch. We need an area for the top of the footer, so this was the address information.

And finally, we need an area for the copyright, Facebook icon. So now we have accounted for all of our tables. The next step is to go back to our worksheet and to begin to add the width to all the different elements. Let's begin with the background table and the 25 pixel wide borders. We want a background table, what we'll do is we'll make the cellpadding 25 pixels wide, that will give us plenty of space for our background image.

We also know that our background image is 550 pixels wide, so we will add that both at the table and at the td tag level. It's important especially for older browsers to specifying both locations. We know the width of our content table is 500 pixels wide, so let's simply highlight copy and paste our width for all of these table data cells. Our final step in this video will be to check our work in a local Web Browser on this computer.

Let's go to the File Browser and open the saved HTML file in a Web Browser, we'll open this with Firefox. We can see that we have all of our elements for our table and we see that we have plenty of room for the background table but we can see several adjustments that we need to make. The Wrapper table needs to have its width set, and we need to center all of the table data cells within our content table, so let's make those changes quickly. We'll set this width at 99% for webmail software to give us a gutter around our email.

And we want to change all of these alignments from left to center. We'll highlight, copy, and then paste. And we can see because of our bookmarks we are at the bottom of the content table. We miss the alignment for the Wrapper table, let's make that last tweak, and there we go. We have all of our tables all lined up, everything is centered with plenty of room.

With our email structure coded out, next we'll add images.

Show transcript

This video is part of

Image for Creating an HTML Email Newsletter
Creating an HTML Email Newsletter

14 video lessons · 18403 viewers

Tim Slavin
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.