Parameters or Arguments
size_value It is the font measurement that will be used as the measurement attribute for the element. It can be expressed as both a numeric or relative value. Numeric values vary from 1 to 7 (1 is the smallest, 7 is the largest, 3 is the default). Relative values can be values such as +1 or -2, increasing by using one font size or reducing via 2 font sizes, respectively.
The fontsize() technique returns a string containing a element. The fee of the size_value parameter is used as the measurement attribute for the element.
The fontsize() technique does now not change the price of the unique string.
var totn_string = 'TechOnTheNet'; console.log(totn_string.fontsize(7));
In this example, we have declared a variable referred to as totn_string that is assigned the string price of ‘TechOnTheNet’. We have then invoked the fontsize() technique of the totn_string variable to return a string that includes the HTML issue with a font size.
We have written the output of the fontsize() approach to the net browser console log, for demonstration purposes, to show what the fontsize() technique returns.
The following will be output to the internet browser console log:
As you can see, the fontsize() approach created a string that carries a element. The cost of the totn_string variable (which is ‘TechOnTheNet’) is enclosed inside the and tags. The font dimension value of 7 that was handed into the fontsize() method as a parameter is used as the measurement attribute for the element.