Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript bold() method

JavaScript bold() method

String Object Reference JavaScript String object


Definition and Usage

The bold() method is used to display a string in bold.

This method returns the string with an tag added, as shown below:

string

Syntax

string

.bold()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the bold() method.


Example

Example

Display a string in bold:

Try it »


String Object Reference JavaScript String object