<font>

Inline font markup.

A <font> tag controls the font face, size, and color for its textual content.

This tag can only occur inside XHTML text containers such as <text> and <button>.

Note: The XHMTL <font> tag, which controls the appearance of its content, is different from the top-level <font> which defines a font and imports it into the application.

<canvas height="30">
  <font name="Arioso" src="ariosor.ttf">
    <face src="ariosob.ttf" style="bold"/>
  </font>

  <text height="24">
    Some <font color="#ff0000">red</font> text, and text
    in <font face="Arioso" size="24">Arioso</font>
    and <font face="Arioso" size="24"><b>Arioso bold</b></font>.
  </text>
</canvas>
Attributes
Name Usage Type (Tag) Type (JS) Default Category
color Tag only color   final

face Tag only string   final

size Tag only size   final