- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 make text bold, italic and underline using jQuery
To make text bold, italic and underline using jQuery, use the jQuery css() method with the CSS properties font-style, font-weight and text-decoration. You can try to run the following code to learn how to make text bold, italic and underline using jQuery −
Example
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").on({ mouseenter: function(){ $(this).css({"font-style": "italic", "font-weight": "bold","text-decoration": "underline"}); } }); }); </script> </head> <body> <p>Move the mouse pointer on the text to make text bold, italic and underline.</p> </body> </html>
- Related Articles
- How to make a text bold and italic in JavaFX?
- How to make a text italic using JavaScript
- How to remove underline from text hyperlink using jQuery?
- How to make text italic in HTML?
- How to make text bold in HTML?
- How to make a specific text on TextView bold in Android using Kotlin?
- How to add underline to Text using FabricJS?
- How to underline a Hyperlink on Hover using jQuery?
- How to create a bold text using JavaScript?
- How to make a specific text on TextView bold in Android?
- How to remove underline with jQuery?
- How to strike through and underline text in JavaFX?
- How to Change Link Underline Color using text-decoration-color CSS
- How to underline a text in HTML?
- How to make a plot title partially bold using ggplot2 in R?

Advertisements