mjml-head-font

4.15.3 • Public • Published

mj-font

This tag imports fonts. The tag has effect only if the template uses the font, too. The href attribute points to a hosted css file; that file contains a @font-face declaration. Example: https://fonts .googleapis.com/css?family=Raleway

<mjml>
  <mj-head>
    <mj-font name="Raleway"
      href="https://fonts.googleapis.com/css?family=Raleway" />
  </mj-head>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text font-family="Raleway, Arial">
          Hello World!
        </mj-text>
      </mj-column>
     </mj-section>
  </mj-body>
</mjml>

try it live

attribute unit description default value
href string URL of a hosted CSS file n/a
name string name of the font n/a

Readme

Keywords

none

Package Sidebar

Install

npm i mjml-head-font

Homepage

mjml.io

Weekly Downloads

572,130

Version

4.15.3

License

MIT

Unpacked Size

4.38 kB

Total Files

4

Last publish

Collaborators

  • mjmlio
  • iryusa
  • loeck
  • ngarnier
  • meriadec
  • kmcb