This tag allows you to modify default attributes on a ml_tag and add mj_class to them.

mj_attributes(...)

mj_all(...)

mj_class(...)

Arguments

...

Unnamed items that comprise this list of MJML tags.

Functions

  • mj_attributes Wrap all your attributes.

  • mj_class Add a class.

  • mj_all Set default attributes for every components inside your email.

See also

Examples

mj_ml( mj_head( mj_attributes( mj_text(padding = 0), mj_class(name = "blue", color = "blue"), mj_class(name = "big", `font-size` = "20px"), mj_all(`font-family` = "Arial") ) ), mj_body( mj_container( mj_section( mj_column( mj_text( `mj-class` = "blue big", "Blue text in Arial and 20px" ) ) ) ) ) )
#> <mjml> #> <mj-head> #> <mj-attributes> #> <mj-text padding="0"></mj-text> #> <mj-class name="blue" color="blue"></mj-class> #> <mj-class name="big" font-size="20px"></mj-class> #> <mj-all font-family="Arial"></mj-all> #> </mj-attributes> #> </mj-head> #> <mj-body> #> <mj-container> #> <mj-section> #> <mj-column> #> <mj-text mj-class="blue big">Blue text in Arial and 20px</mj-text> #> </mj-column> #> </mj-section> #> </mj-container> #> </mj-body> #> </mjml>