Latest web development tutorials

JavaScript bold () method

String Object Reference JavaScript String Object

Definition and Usage

bold () method for the string appears in bold.

This method returns a string plus <b> tag, as follows:

<B> string </ b>

grammar

string.bold()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support bold () method.


Examples

Examples

Use bold string:

<script>

var str = "Hello world!";
document.write(str.bold());

</script>

try it"


String Object Reference JavaScript String Object