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 trial

Design HTML Email Design Coding HTML Email Coding with Limited HTML

johannes terry
PLUS
johannes terry
Courses Plus Student 35 Points

When creating an HTML Email, can you use <style> to style some of your tags in your html document?

HTML Email and using the <style> tag

2 Answers

Max Senden
Max Senden
23,177 Points

Hi Johannes,

Yes, you can implement <style> directly in the html sheet. You can even style specific elements like the tags you mentioned. e.g. <h3 style="font-family: 'Helvetica'; font-weight: bold;">.

However, html emails are one of the most frustrating things to style. It much trail and error to make it look the way you want it to look on all devices. So make sure to do a lot of testing. Otherwise it might look good and clean on your devices, but it might look like a disaster on mine.

johannes terry
PLUS
johannes terry
Courses Plus Student 35 Points

Thank you for replying to my question. "it might look good and clean on your devices, but it might look like a disaster on mine." Do you mean because we may have devices of different screen sizes? I thought that can be fixed by making the HTML email responsive? But you can't cover every screen, correct?

Max Senden
Max Senden
23,177 Points

Yes, that's part of the answer. The other part is that each browser has its own default styling. So be prepared to do a lot of tweaking to make it perfect :-)