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 display a string in the fixed-pitch font?
Use the JavaScript fixed() method to display in fixed-pitch font as if it were in a <tt> tag.
Example
You can try to run the following code to display a string in the fixed-pitch font.
<html>
<head>
<title>JavaScript String fixed() Method</title>
</head>
<body>
<script>
var str = new String("Hello world");
alert(str.fixed());
</script>
</body>
</html>Advertisements