Definition and Usage The fontsize() method is used to display a string in a specified size. Syntax stringObject.fontsize(size) ...
Definition and Usage
The fontsize() method is used to display a string in a specified size.
Syntax
stringObject.fontsize(size) |
Parameter | Description |
size | Required. A number that specifies the font size |
Tips and Notes
Note: The size parameter must be a number from 1 to 7.
Example
In this example "Hello world!" will be displayed in a large font-size:
<script type="text/javascript"> var str="Hello world!";
document.write(str.fontsize(7)); </script> |