npm.io
5.4.0 • Published 1 month ago

mjml-body

Licence
MIT
Version
5.4.0
Deps
3
Size
6 kB
Vulns
0
Weekly
0
Stars
18.2K

mj-body

This is the starting point of your email. To aid accessibility, MJML automatically adds a div tag as the child of the body, with the following ARIA attributes role="article", aria-roledescription="email" and aria-label="EMAIL NAME", where 'EMAIL NAME' is taken from the content of the mj-title tag. The lang and dir attributes are also added here, with values taken from the mjml tag.

<mjml>
  <mj-body>
    <!-- Your email goes here -->
  </mj-body>
</mjml>

Attributes

attribute accepts description default value
background-color CSS color formats the general background color
css-class string class, added to the body tag in the generated HTML.
id string id, added to the body tag in the generated HTML
width px email width 600px

Try it live