Articles on Trending Technologies

Technical articles with clear explanations and examples

How to check if a String contains another String in a case insensitive manner in Java?

Alankritha Ammu
Alankritha Ammu
Updated on 11-Mar-2026 2K+ Views

One way to do it to convert both strings to lower or upper case using toLowerCase() or toUpperCase() methods and test.Examplepublic class Sample {    public static void main(String args[]){       String str = "Hello how are you welcome to Tutorialspoint";       String test = "tutorialspoint";       Boolean bool = str.toLowerCase().contains(test.toLowerCase());       System.out.println(bool);    } }Outputtrue

Read More

How to add background music to your web page?

Vikyath Ram
Vikyath Ram
Updated on 11-Mar-2026 36K+ Views

To add background music on a web page, use … element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.Set the width and height in a way the player hides on the web page. The loop attribute is added to specify whether the audio will start over again. Add the music file to the server and mention the link in src attribute.ExampleYou can try to run the following code to add background music to your web page:           HTML background music               ...

Read More

Bootstrap Collapsible in

George John
George John
Updated on 11-Mar-2026 275 Views

The collapsible in class in Bootstrap is used to display the collapsible content.You can try to run the following code to implement the collapsible in class −Example           Bootstrap Example                                          Quiz          Click below to toggle the button content.          More Quizzes                       We have quizzes on Java, PHP, Ruby, Quantitative Aptitude, ASP.net, etc.                    

Read More

bg-light class for Bootstrap 4 cards

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 461 Views

To set a light grey background for the Bootstrap 4 cards, use the bg-light class.Use “card bg-light” like any other class in Bootstrap −   Image Editor The above gives a light grey background to the Bootstrap card.Let us see an example of the card-light class −Example       Bootstrap Example                             Web Tools           Image Editor             Image Optimizer      

Read More

Write a java program to tOGGLE each word in string?

Alankritha Ammu
Alankritha Ammu
Updated on 11-Mar-2026 1K+ Views

You can change the cases of the letters of a word using toUpperCase() and toLowerCase() methods.Split each word in the string using the split() method, change the first letter of each word to lower case and remaining letters to upper case.Examplepublic class Sample{    public static void main(String args[]){       String sample = "Hello How are you";       String[] words = sample.split(" ");       String result = "";       for(String word:words){          String firstSub = word.substring(0, 1);          String secondSub = word.substring(1);          result = result+firstSub.toLowerCase()+secondSub.toUpperCase()+" ";       }       System.out.println(result);    } }OutputhELLO hOW aRE yOU

Read More

Check if a string contains a number using Java.

Anjana
Anjana
Updated on 11-Mar-2026 41K+ Views

To find whether a given string contains a number, convert it to a character array and find whether each character in the array is a digit using the isDigit() method of the Character class.Examplepublic class ContainsExample {    public static void main(String args[]){       String sample = "krishna64";       char[] chars = sample.toCharArray();       StringBuilder sb = new StringBuilder();       for(char c : chars){          if(Character.isDigit(c)){             sb.append(c);          }       }       System.out.println(sb);    } }Output64

Read More

How to use HTML5 localStorage and sessionStorage?

Nancy Den
Nancy Den
Updated on 11-Mar-2026 613 Views

HTML5 introduced two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome the following drawbacks.Cookies are included with every HTTP request, thereby slowing down your web application by transmitting the same data.Cookies are limited to about 4 KB of data. Not enough to store required data.The two mechanisms for storage are session storage and local storage and they would be used to handle different situations.Session StorageThe Session Storage is designed for scenarios where the user is carrying out a single transaction but could be carrying out multiple transactions in different windows at ...

Read More

Set whether or not an element should be visible while not facing the screen with JavaScript?

Monica Mona
Monica Mona
Updated on 11-Mar-2026 245 Views

Use the JavaScript backfaceVisibility property to set whether or not an element should be visible while not facing the screen.ExampleYou can try to run the following code to learn how to implement a backfaceVisibility property in JavaScript −                    div {             width: 200px;             height: 300px;             background: blue;             color: black;             animation: mymove 2s infinite linear alternate;          }          @keyframes mymove {             to {transform: rotateY(180deg);}          }                     Check below to display backface                Demo             backfaceVisibility Property                function display(x) {             if (x.checked === true) {                document.getElementById("box").style.backfaceVisibility = "visible";             } else {                document.getElementById("box").style.backfaceVisibility = "hidden";             }          }          

Read More

How to set outline color with JavaScript?

Sai Subramanyam
Sai Subramanyam
Updated on 11-Mar-2026 561 Views

To set outline color, use the outlineColor property in JavaScript. You can try to run the following code to learn how to implement outlineColor property − Example Live Demo #box { border: 2px solid red; } Demo Content Change outline color function display() { document.getElementById("box").style.outlineColor = "#FF5733"; document.getElementById("box").style.outline = "2px solid"; }

Read More

How to show image in alert box using JavaScript?

Nancy Den
Nancy Den
Updated on 11-Mar-2026 2K+ Views

To show an image in alert box, try to run the following code. Here, an alert image is added to the custom alert box −Example                                function functionAlert(msg, myYes) {             var confirmBox = $("#confirm");             confirmBox.find(".message").text(msg);             confirmBox.find(".yes").unbind().click(function() {                confirmBox.hide();             });             confirmBox.find(".yes").click(myYes);           ...

Read More
Showing 151–160 of 61,248 articles
« Prev 1 14 15 16 17 18 6125 Next »
Advertisements