
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to create a bold text using JavaScript?
To create a bold text using JavaScript, use the bold() text. This method causes a string to be displayed as bold as if it were in a <b> tag.
Example
You can try to run the following code to create a bold text with JavaScript −
<html> <head> <title>JavaScript String bold() Method</title> </head> <body> <script> var str = new String("Demo Text"); document.write(str.bold()); alert(str.bold()); </script> </body> </html>
- Related Articles
- How to create a strikethrough text using JavaScript?
- How to create a blink text using JavaScript?
- How to create a small font text using JavaScript?
- How to create a big font text using JavaScript?
- How to create a link from a text using JavaScript?
- How to make text bold, italic and underline using jQuery
- How To Create a Bold Makeup Look?
- How to make a specific text on TextView bold in Android using Kotlin?
- How to use Bold & Non-Bold Text In A Single UILabel in iOS/iPhone?
- How to make text bold in HTML?
- How to Create a Bold Lip Makeup Look?
- How to make a text bold and italic in JavaFX?
- How to add bold annotated text in Matplotlib?
- How to bold text in checkbox in Excel?
- How to make a specific text on TextView bold in Android?

Advertisements