Unary operators are the simplest operators in JavaScript which works on one value, or we can say on one operand. There are mainly six kinds of unary operators in JavaScript which are given as − Unary Plus Unary Minus Increment operator (Prefix) Increment operator (Postfix) Decrement operator (Prefix) Decrement operator (Postfix) In this tutorial, we are going to learn about the unary plus (+) operator. To use the unary plus operator we just need to put a plus sign in front of the operand. This operator is basically used to convert a non-numeric value to a numeric value, ... Read More
In this tutorial, we are going to build the famous hit the mouse game using HTML, CSS, and vanilla JavaScript. Many of you wondering what is Vanilla JavaScript, it is nothing just plain JavaScript written without the use of any libraries. In the hit the mouse game, the player needs to hit the mouse with the hammer in order to earn points and win the game. Approach To design the mouse game, we need to write the code IN HTML, CSS, and JavaScript. Step 1 − Firstly, let us look into the HTML part of the code; in this part, ... Read More
A Pong game is a two-player paddle game where each player’s task is to save the ball from hitting the wall. Whenever player 1 hits the ball at the opponent’s wall then player one will receive a point, and similarly, player 2 will get a point if he/she hits the ball at the opponent’s wall. In this tutorial, we will create a Pong Game in JavaScript. Approach To make the pong game using JavaScript we need to write code in HTML, CSS, and JavaScript. We have written certain functions in JavaScript to build the Pong game which is defined below ... Read More
Bibliography is a list of the written sources of information on a subject. We use tag in HTML, to create a bibliography section. The tag defines the work on a subject. The tag is also used to add work title a song, a painting, a movie, etc. It indicates citation and whatever comes inside the tag represents work title. The text between the tag renders in italic format. We use tag to list the items and tag to add the title of the subject. Syntax Following is the syntax for the tag. ... Read More
A list is a connected items written consecutively (usually one below other). Using HTML, you can create two kinds of lists unordered list and ordered list. An ordered list is marked with the numbers by default. You can create an ordered list using the tag and, define the list items using . We can create 4 types of ordered lists IN HTML − type="1"− This creates a numbered list starting from 1. type="A"− This creates a list numbered with uppercase letters starting from A. type="a"− This creates a list numbered with lowercase letters starting from a. type="I"− This ... Read More
A list is a connected items written consecutively (usually one below other). Using HTML, you can create two kinds of lists unordered list and ordered list. An ordered list is marked with the numbers by default. You can create an ordered list using the tag and, define the list items using . We can create 4 types of ordered lists IN HTML − type="1"− This creates a numbered list starting from 1. type="A"− This creates a list numbered with uppercase letters starting from A. type="a"− This creates a list numbered with lowercase letters starting from a. type="I"− This ... Read More
A list is a connected items written consecutively (usually one below other). Using HTML, you can create two kinds of lists unordered list and ordered list. An ordered list is numbered and an unordered list is not numbered it can be created with the tag and define the items of the list using the tag . We can create 4 types of unordered list in HTML − disc − This creates an unordered list marked to a bullet (default). circle − This creates an unordered list marked to a circle. square − This creates an unordered list marked to a square. ... Read More
An ordered list is numbered and an unordered list is not numbered it can be created with the tag and define the items of the list using the tag . We can create 4 types of unordered list in HTML − disc − This creates an unordered list marked to a bullet (default). circle − This creates an unordered list marked to a circle. square − This creates an unordered list marked to a square. none − This creates an unordered list without any marker. Syntax Following is the syntax to create an unordered list with disc bullets in HTML. ... Read More
We can easily add HTML tag inside a table. The HTML tag should be placed inside the tag. For example, adding a paragraph … tag or other available tags inside the tag. Syntax Following is the syntax to use an HTMl tag inside HTML table. Paragraph of the context Example 1 Given below is an example to use an HTML tag inside HTML table. DOCTYPE html> ... Read More
We use the CSS property border-spacing, to set border spacing for an HTML table. It adds space around the table border between the adjacent cells in a table. We should specify the value in pixels for the border-spacing property to add. Syntax Following is the syntax for adding space around table border in HTML. border-spacing: 10px; Example 1 Given below is an example where we are creating a table and trying to add spaces around it. DOCTYPE html> ... Read More