
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
Found 10483 Articles for Web Development

746 Views
Use the marginBottom property in JavaScript, to set the bottom margin.ExampleYou can try to run the following code to set the bottom margin of an element with JavaScript −Live Demo This is demo text. Set bottom margin function display() { document.getElementById("myID").style.marginBottom = "95px"; }

480 Views
To set the type of the list-item marker type, use the listStyleType property. The marker type can be square, circle, dic, etc.ExampleYou can try to run the following code to set the list-item marker type with JavaScript −Live Demo One Two Update list style type (square) Update list style type (decimal) function displaySquare() { document.getElementById("myID").style.listStyleType = "square"; } function displayDecimal() { document.getElementById("myID").style.listStyleType = "decimal"; }

260 Views
Use the margin property in JavaScript, to set the margins. You can try to run the following code to set the margins of an element with JavaScript −ExampleLive Demo Set all four margins This is demo text. function display() { document.getElementById("myID").style.margin = "30px 20px 40px 40px"; }

715 Views
Use the maxHeight property in JavaScript to set the maximum height. You can try to run the following code to set the maximum height of an element with JavaScript −ExampleLive Demo #box { width: 300px; background-color: gray; overflow: auto; } Click below to set Maximum height. Max Height This is a div. This is a div. This is a div. This is a div. This is a div. This is a div. This is a div. This is a div. This is ... Read More

207 Views
To set the position of the marker of the list-item, use the listStylePosition property. You can try to run the following code to set the position of the list-item marker with JavaScript −ExampleLive Demo One Two Add list inside Add list outside function displayInside() { document.getElementById("myID").style.listStylePosition = "inside"; } function displayOutside() { document.getElementById("myID").style.listStylePosition = "outside"; }

161 Views
To set an image as the marker in list-item, use the listStyleImage property in JavaScript.ExampleYou can try to run the following code to set an image as the list-item marker with JavaScript −Live Demo One Two Update list image function display() { document.getElementById("myID").style.listStyleImage = "url('http://tutorialspoint.com/css/images/bullet.gif')"; }

464 Views
To set the distance between lines, use the lineHeight property. You can try to run the following code to set the distance between lines in a text with JavaScript −ExampleLive Demo Heading 1 This is Demo Text.This is Demo TextThis is Demo Text Set distance between lines function display() { document.getElementById("myID").style.lineHeight = "2"; }

112 Views
To set the list properties in a single declaration, use the listStyle property in JavaScript.ExampleYou can try to run the following code to set the listStylePosition and listStyleType property in one declaration with JavaScript −Live Demo One Two Change style function display() { document.getElementById("myID").style.listStyle = "circle outside"; }

435 Views
To set the space between characters, use the JavaScript letterSpacing property.ExampleYou can try to run the following code to set the space between characters in a text with JavaScript −Live Demo Heading 1 This is Demo Text. Set Space between characters function display() { document.getElementById("myID").style.letterSpacing = "7px"; }

173 Views
Use the fontSizeAdjust property to preserve the readability of text. It sets the aspect value of a font i.e. the difference between the size of lowercase and uppercase letters.ExampleYou can try to run the following code to preserve the readability of text when font fallback occurs with JavaScript −Live Demo Heading 1 This is Demo Text. Set Aspect Value function display() { document.getElementById("myID").style.fontFamily = "verdana,sans-serif"; document.getElementById("myP").style.fontSizeAdjust = "0.90"; }