Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a small font text using JavaScript?
To create a small font text with JavaScript, use the small() method. This method causes a string to be displayed in a small font as if it were in a <small> tag.
Example
You can try to run the following code to create a small font using JavaScript −
<html>
<head>
<title>JavaScript String small() Method</title>
</head>
<body>
<script>
var str = new String("Demo Text");
document.write(str.small())
alert(str.small());
</script>
</body>
</html>Advertisements