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
In electrical and electronic circuits, there are five major electrical quantities that used to analyze circuits. These quantities are electric charge, electric current, voltage, electric power and electrical energy. In this article, we shall learn about these quantities in detail. What is Electric Charge? Electric charge or simply charge is the property of subatomic particles like protons and electrons. The electric charge is denoted by symbol Q or q and measured in Coulombs (C). Technically, electric charge is the concept which explains the electrical behavior of materials. Therefore, it is the electric charge that forms the basis of existence of ... Read More
A circuit element is the basic building block of an electric circuit. Basically, a circuit element is a mathematical model of an electrical device which is characterized by the relationship between voltage and current. The circuit element is the most elementary part of a circuit, therefore it cannot be further divided into sub-components. The common examples of circuit elements are resistors, inductors, capacitors, energy sources, etc. Types of Circuit Elements Depending on the behavior in the circuit, the electric circuit elements can be classified into the following types − Active Elements Passive Elements Unilateral Elements Bilateral Elements Linear Elements ... Read More
In digital electronics, basic logic gates are the important components of all digital devices and systems. A logic gate is a digital circuit whose operation is based on the Boolean function. Thus, logic gates are used for performing different logical operations on binary inputs to produce a binary output. Therefore, we can simply state that logic gates are the basic building blocks of digital devices and systems. All digital systems like computers are able to perform very complex logic operations, and these operation are performed by the interconnected system of basic logic gates. This interconnection of logic gates to perform ... Read More