use font tag in html textarea

The htmlText supports only a limited set of tags and styles. Specifically, span supports only a classattribute which should be the name of a class specified in a StyleSheet object.

You can use the font tag in this particular case. But remember that color supports only hexadecimal#ffffff values and size supports only absolute pixel size and relative (+2, -1 etc) size values.

tags.htmlText = "<font color="#a89433" size="10">street</font>,
  <font color="#b37620" size="11">motor</font>";
原文地址:https://www.cnblogs.com/cnsoft/p/2868266.html