Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPaula Mourad
5,154 PointsGetting Deeper in Code
Hi! Can someone explain a bit more what the syntax mean and why these values are not set in the CSS?
Example:
<td align="center" valign="top" id="bodyCell">
By reading I kind of guess what it means...but if someone could explain, that would be great! :)
Thanks!
Paula
3 Answers
Paula Mourad
5,154 PointsHi Kevin Korte ! Thank you so very much for the link!! I was able to follow it and I ended up with a great email! :) Thanks again! Paula
Kevin Korte
28,149 PointsSo align=center
is probably self explanatory. This refers to horizontal spacing. valign
is vertical align, and in this case top means the content is aligned to the top of the data cell. The options here are top
, middle
, bottom
, and baseline
. The id is just like any other id.
The reason this is inline is that inline CSS is the recommended way to apply css when using HTML email. Referencing an external CSS is unreliable. Many browser based email clients strip out the head and body tags of your HTML email.
So we're left with writing HTML email like its 1990.
Paula Mourad
5,154 PointsKevin Korte Thank you so very much! I've been following the HTML Email Design class, and yet I understand the basics of it, there are MANY things that I have no idea of. The course goes way too fast for those who are entering this world!
I appreciate your help and I will note this down. If you know of any site or video that explains this in a simpler way or in a more basic level, please let me know :)
Cheers! Paula
Kevin Korte
28,149 PointsYou're welcome.
HTML email sucks to write, no doubt about it.
This article does a pretty good job of walking you through a custom template http://webdesign.tutsplus.com/articles/build-an-html-email-template-from-scratch--webdesign-12770
Honestly, I like knowing how an HTML email is built, but for the most part, I use MailChimp's WYSIWYG email builder, which offers enough customization to create nice looking custom templates.
It's also a huge time saver for me, so I can focus on coding other things, instead of HTML email. :)