In this tutorial, we will learn how to set the width of the top border with JavaScript. The border of an element is the outer part of the element. The border width for each side can be set with different JavaScript properties. For example, to set the width of the top border in JavaScript, use the borderTopWidth property. There are two approaches to specifying the width of the top border − Using the setProperty method Using the borderTopWidth property Using the setProperty method to set the width of the top border In JavaScript, any property of an element, ... Read More
In this tutorial, we will learn how to set the type of quotation marks for embedded quotations with JavaScript. The types of quotation marks can be changed using JavaScript. For example, if a sentence is in double quotes(“”), it can be modified to single quotes(‘’). To set the quotation, use the element. With that, add the type of quotation marks with the quotes property. Using the quotes property to set the type of quotation marks In JavaScript, the quotes property is used to set the type of quotation marks for embedded quotations. The quotation marks can be set using ... Read More
In this tutorial, we will learn how to convert a string to uppercase letters for the host's locale in JavaScript. While using a locale language to write for a website, we might have to convert the sentence from lowercase to uppercase without changing the structure of the string. Using the toLocaleUpperCase() Method In JavaScript, we use the toUpperCase() Method as well as the toLocaleUpperCase() to change the letters of a string to uppercase. Although both methods give similar output the toLocaleUpperCase() is used primarily for local languages. Syntax We will use the following syntax to convert the letters of the ... Read More
In this tutorial, we will learn how to set the left margin of an element with JavaScript. Margin is the space around an element outside its border. The margin of an element can be on all sides, such as: left, right, top, and bottom. Use the marginLeft property in JavaScript to set the left margin. In this tutorial, we will discuss two approaches to setting the left margin − Using the marginLeft property Using the setProperty method Using the marginLeft property to set the left margin of an element The marginLeft property of an element in JavaScript is ... Read More
In this tutorial, we will learn how to set the inward offsets of the image border with JavaScript. An image can be set in the border as a border image using CSS properties. The border image can be set using different parameters. To set the inward offsets of the image border, use the borderImageSlice property in JavaScript. We will see two different approaches to setting up the inward offsets of the image border with JavaScript − The borderImageSlice Property The setProperty Method Using the borderImageSlice Property The border image’s inward offsets are specified by the borderImageSlice property of ... Read More
In this tutorial, we will learn how to set the initial length of a flexible item with JavaScript. Flexbox is a one-dimensional layout model that distributes space among items in an interface and provides flexible item alignment properties. It creates flexible items. Use the flexBasis property in JavaScript to set the initial length of a flexible item. In this tutorial, we will see two approaches to setting the initial length of a flexible item − Using the property style.flexBasis Using the method style.setProperty Using the style.flexBasis Property The style flexBasis is a flexbox property that determines the initial ... Read More
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
A system that is used for representing numbers is called the number system. In digital electronics, the numbers are used to represent the information. Hence, it is important to learn and understand different types of number systems so we can easily represent and interpret the information in the form of numbers. There are several types of number systems and the basis of this classification is the base or radix of the number system. The base or radix of the number system is the total number of symbols used to denoted the numbers in the number system. Types of Number Systems ... Read More
There were several theories stated to explain the arrangement of subatomic particles. The Plum Pudding Model, also known as Thomson’s Plum Pudding Model, is also a scientific model for explaining the arrangement of subatomic particles. This model was first proposed by a British physicist Sir J. J. Thomson in 1904. This model was stated soon after the discovery of the electron, but prior to the discovery of the nucleus of the atom. According to the plum pudding model, "a volume of positive charge surrounds electrons in an atom, like negatively charged plums embedded in a positively charged pudding." Hence, it ... Read More
In electrical and electronics engineering, we frequently come across two terms "circuit" and "circuit element". Where, an electric circuit element is the most elementary building block of an electric circuit, and the electric circuit is an interconnection of different circuit elements connected in a fashion so they form a closed path for current to flow. Technically, an electric circuit element is the mathematical model of an electrical device and can be completely characterized by its voltage and current relationship. Also, a circuit element being the most basic building block cannot be subdivided into other devices. There are three most basic ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP