JavaScript String fontcolor()

❮ JavaScript String Reference

Example

let text = "Hello World!";
let result = text.fontcolor("green");
Try it Yourself »

Description

String fontcolor() is deprecated in JavaScript.

Avoid using it.

It may cease to work in your browser at any time.

The fontcolor() method returns a string embedded in a <font> tag:

<font color="colorvalue">string</font>

The <font> tag is not supported in HTML5.


Syntax

string.fontcolor("color")

Parameters

Parameter Description
color Required.
A color value in rgb or hex.

Return Value

A string embedded in the <font> tag.

❮ JavaScript String Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.