Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Correct <br /> Tags and set Title #814

Closed
wants to merge 1 commit into from
Closed

Correct <br /> Tags and set Title #814

wants to merge 1 commit into from

Conversation

Meistercoach83
Copy link
Contributor

No description provided.

@lirantal
Copy link
Member

@Meistercoach83 how about keeping the indentation to 2 spaces?

@rhutchison
Copy link
Contributor

@Meistercoach83 Why do we need to correct
tags to be compatible with XHTML?
is sufficient.

@@ -1,16 +1,17 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the xhtml here when we are using HTML5 doctype?

@pgrodrigues
Copy link
Contributor

@ilanbiala I removed my last reply to your comment because I misunderstood it :P

@lirantal
Copy link
Member

@Meistercoach83 can you quickly google up if email clients really do require an XHTML document? I'm pretty sure they do but it would be good if we can have some kind of assurance.

@rhutchison @ilanbiala I still think it is better to make the email templates XHTML compatible rather than HTML5 as they are actually used in order to be sent to email clients, and email clients != browsers.

@lirantal lirantal self-assigned this Aug 19, 2015
@lirantal lirantal added this to the 0.4.x milestone Aug 19, 2015
@Meistercoach83
Copy link
Contributor Author

Which doctype should I use in HTML email?

"If you’re going to use CSS3, XHTML 1.0 Transitional is the doctype for you (until HTML5 becomes standard, anyway)."

"XHTML for validation"
The other thing is, if you put a premium on validating your code (as well as you can when coding for email, anyway), then we recommend the XHTML 1.0 Transitional doctype. Naturally, not having a doctype will throw errors and and the HTML5 doctype is still marked as experimental. Mike Kleiman has a light summary on standards vs. quirks mode and email clients, should you wish to get all semantic.

Well, this is by no means an exhaustive test and we’re more than happy to test out specific elements that haven’t been covered here. But the moral of the story is that if you are keen on retaining the default margins on elements (and like CSS3), use the XHTML 1.0 Transitional doctype. That said, there are loads of email clients that arbitrarily add margins and padding to elements, so be sure to check our forums before you pin a rendering issue on the doctype used in your email.

Our friends at Email on Acid have been doing some pretty comprehensive doctype testing themselves. Well worth a read!

What doctype should I use? After all this deliberation, our recommendation is to use XHTML 1.0 Transitional doctype:" (@lirantal :)

@lirantal
Copy link
Member

I agree with keeping the XHTML standards and doctype for the e-mails being sent.
Let's go with that, and in the future we can update. These are anyway not that very rich e-mail templates so I don't see this becoming an issue anytime soon.

@lirantal
Copy link
Member

@Meistercoach83 can you update the indentation there back to 2 spaces?

This was referenced Aug 20, 2015
@ilanbiala ilanbiala modified the milestones: 0.4.1, 0.4.x Aug 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants