Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Lokesh Badavath
67 articles
Adding an element at a given position of the array in Javascript
In this article, we are going to learn how to add an element at a given position of the array in JavaScript. An array is a special variable that can hold more than one value. JavaScript provides several ways to insert an element at a specific index, including the built-in splice() method and the spread operator approach. Syntax The most common way to insert an element at a given position is using the splice() method − array.splice(index, 0, element); Here, index is the position where the element should be inserted, 0 means no elements ...
Read MoreHow to center align text in table cells in HTML?
We use the CSS property text-align to center align text in table cells. The text-align property controls the horizontal alignment of content within and elements. By default, table header cells () are center-aligned, while table data cells () are left-aligned. We can override this default behavior using CSS to achieve the desired alignment. The property accepts values like center, left, right, and justify. Syntax Following is the syntax to center align text in elements − Table header... Following is the syntax to center align text in elements − ...
Read MoreHow to add space around table border in HTML?
The border-spacing CSS property adds space between table cells by controlling the distance between adjacent cell borders. This property only works on tables that use the separated borders model (the default), not on tables with collapsed borders. Syntax Following is the syntax for adding space around table border in HTML − border-spacing: value; The border-spacing property accepts the following values − Single value − Sets equal horizontal and vertical spacing (e.g., border-spacing: 10px;) Two values − Sets horizontal and vertical spacing separately (e.g., border-spacing: 10px 5px;) Units − Accepts pixels (px), ems ...
Read MoreHow to use an HTML tag inside HTML table?
HTML allows you to place any valid HTML tag inside table cells, making tables highly flexible for displaying structured content. The HTML tags should be placed inside (table data) or (table header) elements to create rich, formatted content within your tables. Syntax Following is the syntax to use HTML tags inside table cells − Content You can include paragraphs, lists, images, links, forms, or any other HTML element inside table cells. The nested tags follow the same rules as regular HTML elements. Using Paragraph Tags in ...
Read MoreHow to create an ordered list in HTML?
An ordered list is a numbered list of items that displays content in a sequential, numbered format. It allows you to control the numbering sequence and group related items in a structured manner. HTML provides the tag to create ordered lists, with each item defined using the tag. The element automatically numbers each list item, starting from 1 by default. You can customize the numbering style using the type attribute to display numbers, letters, or Roman numerals. Syntax Following is the basic syntax to create an ordered list in HTML − ...
Read MoreHow to create an unordered list with disc bullets in HTML?
An unordered list in HTML displays items without numerical ordering, using bullet points instead. The element creates the list container, while elements define individual list items. By default, unordered lists use disc bullets, but you can customize the bullet style using CSS. Syntax Following is the syntax to create an unordered list with disc bullets in HTML − Item in list Item in list Item in list Since disc is the default bullet style for unordered lists, you can also create ...
Read MoreHow to create an unordered list with circle bullets in HTML?
An unordered list displays a collection of items marked with bullets such as circles, discs, or squares. The tag creates the list container, while tags define individual list items. By default, unordered lists use solid disc bullets, but you can customize the bullet style using CSS. To create circle bullets specifically, you use the CSS list-style-type property with the value circle. This property can be applied either inline with the style attribute or through external CSS stylesheets. Syntax Following is the syntax to create an unordered list with circle bullets − ...
Read MoreHow to create an unordered list with square bullets in HTML?
An unordered list in HTML displays items without numbering, using bullet markers instead. By default, unordered lists use circular bullets, but you can customize the bullet style using the list-style-type CSS property to create square bullets, circles, or remove bullets entirely. HTML provides four main bullet types for unordered lists − disc − Creates circular bullets (default style) circle − Creates hollow circular bullets square − Creates solid square bullets none − Removes all bullet markers HTML List Bullet Types ...
Read MoreHow to Create an Unordered List with Image Bullets in HTML?
An unordered list in HTML displays items without any numbering or ordering. It is created using the tag with individual list items defined using tags. By default, unordered lists use simple bullet points, but we can customize these bullets to use images for a more visually appealing design. HTML provides several built-in bullet styles for unordered lists − disc − Creates solid circular bullets (default style) circle − Creates hollow circular bullets square − Creates solid square bullets none − Removes all bullet markers Beyond ...
Read MoreHow to create an unordered list without bullets in HTML?
An unordered list in HTML displays a list of items marked with bullets (•), circles, discs, or squares by default. The tag creates an unordered list, and each list item is defined using the tag. However, sometimes you need to display a list without any bullets for cleaner presentation or custom styling. To remove bullets from an unordered list, you can use the CSS list-style-type property set to none. This property controls the appearance of list item markers and can be applied inline or through external CSS. Syntax Following is the syntax to create an ...
Read More