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

Christian Byrd
Christian Byrd
6,239 Points

Deprecation of html <center> tag

Not a question but a comment for any future viewer of this series. I had never seen the <center> tag before, so I googled it and according to MDN, the tag has been deprecated in favor of centering with CSS. Just wanted to give a heads up to everyone out there.

MDN link: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center

Marc Castillo
seal-mask
.a{fill-rule:evenodd;}techdegree
Marc Castillo
Front End Web Development Techdegree Student 2,888 Points

While the <center> tag is deprecated, we still use it in the development of emails. We would use CSS to center everything in the development of a website, but most of the email clients will still read and render deprecated HTML tags. I've actually had to use the <font> tag on some of the emails that I've developed because Outlook wouldn't render my typeface correctly.

4 Answers

Jeremy Lapine
Jeremy Lapine
15,247 Points

In an earlier video it was stated that HTML for emails is very much behind the times in comparison to the HTML you would use to build out a web site or application. Thus the use of a deprecated tag and doctype.

Steven Parker
Steven Parker
229,732 Points

Good point. This video is apparently pre-HTML5, when that tag was in common use.

Another point worth noticing is the deprecated DOCTYPE shown in the video. The HTML5 version is much simpler and more standardized, as discussed at this MDN page.

Email rendering engines are still using outdated HTML and CSS.

Rachel Heneault
PLUS
Rachel Heneault
Courses Plus Student 12,155 Points

So my question is...for the record it is OK to use these old - deprecated tags in an HTML email because its not really about browsers as much as it is about antiquated email software, such as Outlook. Creating an email for work, I haven't done this in a while and I want to be sure I am using the best practices for html email.