-1

This html shows a red text in Chrome and Firefox:

<font color="rgba(0,0,0,0)">foobar</font>

One would expect transparent font. Is this a browser-bug?

0stone0
  • 34,288
  • 4
  • 39
  • 64
doublemax
  • 443
  • 1
  • 4
  • 11

1 Answers1

7

You are confusing HTML and CSS. The color attribute of the font element only takes an hex value, such as #000000 which doesn't support transparency. (See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font#attr-color). rgba(0,0,0,0) is CSS syntax and can't be used there.

Generally you shouldn't be using the font element anyway.

RoToRa
  • 37,635
  • 12
  • 69
  • 105