Are elements required in the CSS selector?

Looking at the CSS selectors in the documentation the two common ones look like:

E.classname
E#id

Is the `E` a requirement to ensure it works consistently or is that just for demonstration? So it's the difference between:

.classname { ... }

and

span.classname,
td.classname { ... }

paulw paulw, 3 years ago

Hey Chris,

Thanks for posting in the forum! The 'E' included in the CSS guide is there just for demonstration. The class will work in the email programs mentioned in the guide, when not including a type selector.

You can use the following selector and it will work okay in a number of email programs.

.classname { ... }

Thanks again Chris!


The Campaign Monitor Blog – HTML email smarts to go with your good looks.

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free