Data Structure
 Networking
 RDBMS
 Operating System
 Java
 MS Excel
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP
- Selected Reading
 - UPSC IAS Exams Notes
 - Developer's Best Practices
 - Questions and Answers
 - Effective Resume Writing
 - HR Interview Questions
 - Computer Glossary
 - Who is Who
 
Object Oriented Programming Articles - Page 836 of 915
 
			
			941 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"; }
 
			
			112 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 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
 
			
			173 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"; }
 
			
			623 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"; }
 
			
			950 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"; }
 
			
			385 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
 
			
			818 Views
Use the textAlign property in JavaScript and set it to right for aligning it horizontally. You can try to run the following code to return the horizontal alignment of text with JavaScript −Example This is demo text Set Horizontal Alignment function display() { document.getElementById("myText").style.textAlign = "right"; }
 
			
			2K+ Views
In this tutorial, we will learn how to lay out table cells, rows, and columns with JavaScript. We can construct and edit DOM (Document Object Model) elements using JavaScript. There are two ways to add HTML components, such as tables, to an HTML document. The first is to include the HTML table tag directly into our HTML webpage, and the second is to create the full table within our JavaScript code. The second method is the most commonly used for building and adding tables to the DOM. The tr abbreviation refers to the table row. This reflects the complete table ... Read More
 
			
			682 Views
Use the paddingLeft property in JavaScript to set the left padding. You can try to run the following code to return the left padding of an element with JavaScript −Example #box { border: 2px solid #FF0000; width: 150px; height: 70px; } This is demo text. Left padding function display() { document.getElementById("box").style.paddingLeft = "100px"; }