JavaScript Objects The Strings Object- fontsize() - Javascript Objects

What is JavaScript String - fontsize() Method?

This method causes a string to be displayed in the specified size as if it were in a <font size="size"> tag.


Its syntax is as follows −

Attribute Details

size − An integer between 1 and 7, a string representing a signed integer between 1 and 7.

Return Value

Returns the string with <font size="size"> tag.


Try the following example.


<font size="3">Hello world</font>

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Javascript Objects Topics