Why email and website layouts are so different

Usually when a web designer asks you to show him the code of your emails he's like... What's that?

Many people say to you "Why models as if it were 1999? "In fact, most professionals who come to email layout do it from web design and we have to "unlearn" many things when we come face to face with a very complicated reality. The main differences between the construction of websites and emails are these:
– Tables
Divs are not safe and the "float" rule does not work in email, so instead we will use tables and play with their alignment to create our layouts. It is also not recommended to use <p>but to place the content directly into the <td>
Inline CSS styling
Although with responsive design this is changing, it is still necessary to declare the style inline, since there are still email clients that do not interpret the contents of the style tag, or external style sheets. We can declare styles within the style tag, always with !important to overwrite what is declared inline, for example to apply styles according to the resolution of the device (media queries) in those email clients that allow us to do so.
- We cannot use Javascript or PHP
We can only use HTML and CSS, as any JS script or PHP code will not work in our email.
- We cannot insert videos
Video support is very limited (pretty much only works on Apple devices and clients) and so we recommend using images with links to a player, or GIFs to replace video and optimise the experience in all email clients. We can use video within the email as long as we have a good fallback for all email services that will not interpret it.
The heterogeneity with which different email clients interpret the code greatly limits the layout, but after some time of dealing with the usual problems that arise we arrive at "email safe" practices that we assimilate and apply to our messages almost unconsciously.