Found 10483 Articles for Web Development

How to create a blink text using JavaScript?

Anjana
Updated on 15-Jun-2020 06:56:11

5K+ Views

To create a blinking text, use the JavaScript blink() method. This method causes a string to blink as if it were in a BLINK tag.Note − HTML tag deprecated and is not expected to work in every browser.ExampleYou can try to run the following code to create a blinking text with the JavaScript blink() method −Live Demo           JavaScript String blink() Method                        var str = new String("Demo Text");          document.write(str.blink());          document.write(" Note: HTML tag deprecated and is not expected to work in every browser.")          

How to create a big font text using JavaScript?

Akshaya Akki
Updated on 15-Jun-2020 06:55:29

947 Views

To create a big font text, use the JavaScript big() method. This method causes a string to be displayed in a big font as if it were in a BIG tag.ExampleYou can try to run the following code to create a big font text −Live Demo           JavaScript String big() Method                        var str = new String("Demo Text");          document.write("Following is bigger text: "+str.big());          

How to create a link from a text using JavaScript?

Manikanth Mani
Updated on 15-Jun-2020 06:54:37

2K+ Views

To create a link, use the JavaScript link() method. This method creates an HTML hypertext link that requests another URL. The following is the syntax:string.link( hrefname )Above, hrefname is any string that specifies the HREF of the tag; it should be a valid URL.ExampleYou can try to run the following code to learn how to work with link() method in JavaScript −Live Demo           JavaScript String link() Method                        var str = new String("Simply Easy Learning");          var URL = "http://www.tutorialspoint.com";          document.write(str.link( URL ));          

How to change string to be displayed as a subscript using JavaScript?

Shubham Vora
Updated on 02-Aug-2022 11:32:20

3K+ Views

In this tutorial, we will learn to change the string displayed as a subscript using JavaScript. The meaning of the subscript string is a string that displays right after the string with a small letter and hangs below. For example, In the Astart, ‘start’ is the subscript string shown in the small letter right after A and hangs below. The substring uses in many fields such as Mathematics, chemicals, etc. It is useful to represent the chemical name. For example, H2, N2, O2, etc. Also, we can use it in mathematics to show the symbols such as X2, A2, etc. ... Read More

How to create a small font text using JavaScript?

Anjana
Updated on 15-Jun-2020 06:52:29

686 Views

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 tag.ExampleYou can try to run the following code to create a small font using JavaScript −Live Demo           JavaScript String small() Method                        var str = new String("Demo Text");          document.write(str.small())          alert(str.small());          

How to create a strikethrough text using JavaScript?

Akshaya Akki
Updated on 15-Jun-2020 06:52:04

5K+ Views

To create a strikethrough text with JavaScript, use the strike() method. This method causes a string to be displayed as struck-out text as if it were in a tag.ExampleYou can try to run the following code to create a strikethrough text −Live Demo           JavaScript String strike() Method                        var str = new String("Demo Text");          document.write(str.strike());          alert(str.strike());          

How to make a text italic using JavaScript

Shubham Vora
Updated on 20-Oct-2022 07:20:05

4K+ Views

In this tutorial, we will learn to make a text italic using JavaScript. We give the italic property to a text to differentiate it from other text within the sentence. In HTML, we can make a text italic by just adding the text within the 'i' tag. But sometimes, we have to make it dynamic, that not possible with HTML. Then, we have to use a programming language like JavaScript to make the text italic. Let's have a look at how to make a text italic using JavaScript. Following are the ways by which we can make a ... Read More

How to change the font size of a text using JavaScript?

Shubham Vora
Updated on 08-Aug-2022 08:32:48

7K+ Views

In this tutorial, programmers will learn to change the font size of the text using JavaScript. Many application allows users to change the font size according to users’ requirement. We need to change the default font size using JavaScript to achieve that. Before we move ahead with the tutorial, let’s learn what values we can assign to the fontsize. Different values users can assign to the font size We can assign the below values to the font size of any element. Every values changes the font size differently which we have explained here. xx-large | x-large | large | ... Read More

How to change the font color of a text using JavaScript?

Shubham Vora
Updated on 12-Sep-2023 01:06:22

43K+ Views

This tutorial teaches us to change the font color of the text using JavaScript. While working with JavaScript and developing the frontend of the application, it needs to change the font color of the text using JavaScript when an event occurs. For example, we have an application which can turn on or off the device. We have a button to turn on or off the device. When the device is on, make the button text green. Otherwise, make the button text red. So, in such cases, programmers need to change the font color using JavaScript. We have some different method ... Read More

How to create a bold text using JavaScript?

Anjana
Updated on 15-Jun-2020 06:48:12

18K+ Views

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 tag.ExampleYou can try to run the following code to create a bold text with JavaScript −Live Demo           JavaScript String bold() Method                        var str = new String("Demo Text");          document.write(str.bold());          alert(str.bold());          

Advertisements