mjml-text
v4.18.0
Published
mjml-text
Downloads
3,757,776
Keywords
Readme
mj-text
Displays text which can be styled.
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text font-family="Helvetica" color="#F45E43">
<h1>Title</h1>
<p>Paragraph</p>
<p style="font-family:Comic Sans Ms">Another paragraph</p>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>Attributes
| attribute | accepts | description | default value |
| -------------------------- | --------------------------------- | ------------------------------------------------------------ | -------------------------------------- |
| align | left right center justify | text-alignment | left |
| color | CSS color formats | text color | #000000 |
| container-background-color | CSS color formats | inner element background color | |
| css-class | string | class name, added to the root HTML element created | |
| font-family | string | font | Ubuntu, Helvetica, Arial, sans-serif |
| font-size | px | text size | 13px |
| font-style | string | CSS values, e.g. normal italic oblique | |
| font-weight | string | text thickness | |
| height | px | height of the element | |
| letter-spacing | px em | letter spacing | |
| line-height | px % | space between the lines | 1 |
| padding | px % | text padding, supports up to 4 parameters | 10px 25px |
| padding-bottom | px % | bottom offset | |
| padding-left | px % | left offset | |
| padding-right | px % | right offset | |
| padding-top | px % | top offset | |
| text-decoration | string | CSS values, e.g. underline overline none |
| text-transform | string | CSS values, i.e. capitalize uppercase lowercase none | |
