- 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
Found 9054 Articles for Front End Technology
746 Views
To set the shadow effect, use the textShadow property in JavaScript.ExampleYou can try to run the following code to return the shadow effect of a text with JavaScript − Set Text Shadow This is Demo Text! This is Demo Text! This is This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! This is Demo Text! function display() { document.getElementById("myID").style.textShadow = "2px 2px 2px #ff0000,20px 5px 2px #F1F1F1"; }
44 Views
Use the textOverflow property to counter the text overflow issue. Add ellipses if the text overflows the containing element.ExampleYou can try to run the following code to learn what is to be done when text overflows the containing element with JavaScript − #myID { border: 2px solid blue; background-color: gray; overflow: hidden; text-overflow: visible; width: 200px; ... Read More
1K+ Views
In this tutorial, we will learn how to set the indentation of the first line of text with JavaScript. The indentation of the first line of a text is a common way to start a new paragraph. To set the indentation, use the textIndent property. To set the indentation of the first line of text with JavaScript, we will discuss two different ways − Using the style.textIndent Property Using the style.setProperty Method Using the style.textIndent Property The style.textIndent property of an element is used to set the indentation of the first line of text. This property is placed ... Read More
909 Views
In this tutorial, we shall learn to set the style of the line in a text decoration with JavaScript. To set the style of the line in JavaScript, use the textDecorationStyle property. You can set underline, double, or overline, etc. for the line style. Let us discuss our topic in brief. Using the Style textDecorationStyle Property We can set or return the line style in a text decoration with this property. The major browsers support this property. Firefox adds support with an alternate property named MozTextDecorationStyle. Syntax Following is the syntax to set the style of the line in ... Read More
152 Views
In this tutorial, we will learn how to set the bottom position of 3D elements with JavaScript. In a web page, handling a 3D element can be tricky. Using JavaScript, we had to set the top, bottom, sides, etc. To set the bottom position of 3D elements, we use the perspectiveOrigin property of an element’s style object. Using style.perspectiveOrigin Property In JavaScript, the style.perspectiveOrigin property is used to set the bottom position or base position of a 3D element. Firstly, we get the element object using the document.getElementById() method and then set the style.perspectiveOrigin property. ... Read More
84 Views
To set the type of line in text-decoration, use the textDecorationLine property. You can try to run the following code to return the type of line in a text-decoration with JavaScript −Example This is demo text. Set Text Decoration function display() { document.getElementById("myText").style.textDecorationColor = "red"; document.getElementById("myText").style.textDecorationLine = "overline"; }
361 Views
Use the paddingTop property in JavaScript to set the top padding. You can try to run the following code to set the top padding of an element with JavaScript −Example #box { border: 2px solid #FF0000; width: 150px; height: 70px; } This is demo text. Top Padding function display() { document.getElementById("box").style.paddingTop = "20px"; }
708 Views
In this tutorial, we will learn how to set the color of the text-decoration with JavaScript. The text-decoration is a CSS property used to decorate text lines. We can decorate a line using underline, overline, line-through, or none. To set the color of the text-decoration with JavaScript, we have multiple ways, and in this tutorial, we will discuss two of them − Using the style.textDecorationColor Property Using the style.setProperty Method Using the style.textDecorationColor Property In JavaScript, the style.textDecorationColor property of an element is used to set the color of the text-decoration of an element. Any color can be ... Read More
641 Views
Use the textDecoration property in JavaScript to decorate the text. You can underline a text using this property.ExampleYou can try to run the following code to set the decoration of a text with JavaScript − This is demo text. Set Text Decoration function display() { document.getElementById("myText").style.textDecoration = "underline"; }
293 Views
Use the textAlignLast property in JavaScript to set the last line to right. Set it to right and allow the right alignment.ExampleYou can try to run the following code to return how the last line of a block or a line right before a forced line break is aligned when text-align is "justify" with JavaScript − #myDIV { text-align: justify; } This is ... Read More