README.md

January 20, 2026 · View on GitHub

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

attributeacceptsdescriptiondefault value
background-colorCSS color formatsthe general background color
css-class          string  class, added to the body tag in the generated HTML.
idstringid, added to the body tag in the generated HTML
widthpxemail width600px

Try it live