JavaScript > Methods

Small style in JavaScript

How to apply small style to the text in JavaScript?

In case we want to apply the small font style to the text in the html page, we can use this approach.

        document.write("This is Small text ");
        document.write(" This is Small text".small());

In the above code snippet, we have written “This is Small text” in both document.write lines but in the 2nd statement we have called the small() method using the text that makes this text in small style as you can see in the below picture.


 Views: 3864 | Post Order: 44

Write for us

Hosting Recommendations