Found 10710 Articles for Web Development

How to Create a Pricing Table using HTML and CSS?

Dishebh Bhayana
Updated on 22-Feb-2023 11:36:28

623 Views

We can create a basic pricing table using just HTML and CSS. A pricing table can be a useful feature to implement in different websites where the purchase of commodities is involved, for example, an e-commerce web application, or travel websites. Let’s learn to create a such table with the help of the example below − Example We will first create an HTML layout of the table in the following index.html file, and then add stylings to it. How to Create Pricing Table using HTML and CSS? ... Read More

How to create the previous and next buttons and non-working on the end positions using JavaScript?

Dishebh Bhayana
Updated on 22-Feb-2023 11:35:10

813 Views

We can create previous and next buttons that would be non-working (or disabled) at their end positions by using vanilla javascript. Javascript is a powerful browser-level language with which we can control and manipulate the DOM elements easily. Here, we will create 2 buttons, and change an HTML element’s content depending on which button is clicked. Example 1 In this example, we will create an “increment” and a “decrement” button which, when clicked, will increment and decrement the HTML element’s content value by 1, respectively. We will also disable the buttons when they reach their extreme positions, which will be ... Read More

How to create pagination in Bootstrap 4?

Dishebh Bhayana
Updated on 22-Feb-2023 11:34:27

274 Views

To implement pagination in our web application, we use the different classes provided to us in Bootstrap 4, like “pagination”, “page-item”, “active”, “disabled”, and so on. Pagination means specifying a page number for a particular page in a series of pages. This could apply to a web application that has lots of pages, a book, or any other entity that has a series of data that we only want to display a part of it at a time. Let’s discuss more about these classes and how we can use them to create a paginated layout in the examples below − ... Read More

How to create numbering using counter-increment property in CSS?

Dishebh Bhayana
Updated on 22-Feb-2023 11:33:22

381 Views

The “counter-increment” property given in CSS is used to increase or decrease the counter values that we can display on a webpage using CSS. CSS counters are useful when we want to count the occurrences of an HTML element in a webpage. We will also use the “counter-reset” CSS property here, which helps us to reset or initialize the CSS counter value to a desired number. Syntax counter-increment − css-counter increment-value; Here, the css-counter refers to the counter variable declared in CSS, and the increment-value refers to the value by which you want to increment or ... Read More

How to automatically close all collapsible elements inside of the accordion when closing the accordion?

Dishebh Bhayana
Updated on 22-Feb-2023 11:32:25

1K+ Views

We will use the bootstrap accordion component in our article to demonstrate how to collapse all the children's accordions inside the parent accordion. An accordion is a collapsible component that helps to display an expand/collapse type of content on the webpage. In this article, we will use the Bootstrap 5 Accordion component to display a list of expandable/collapsible elements in a nested fashion. Now, first, we will listen to the “hide” collapse event by attaching an event listener to the parent accordion. After that, when the “hide” collapse event gets fired, we will find all the collapsible elements inside that ... Read More

How to Automatically Close Alerts using Twitter Bootstrap?

Dishebh Bhayana
Updated on 22-Feb-2023 11:30:51

2K+ Views

We can automatically close the Bootstrap Alert component by using the “close” method and “hide” class provided by Twitter bootstrap. Twitter Bootstrap Alert component is used to display an alert with a message to the user, often in response to a user action or an event. Approach 1: Using Close Method In this approach, we will use the “close” method provided by bootstrap to close the component, and we will use the setTimeout() browser API to achieve this after 5 seconds. Syntax $(alertComponent).alert(‘close’) Here, “alertComponent” is the Bootstrap Alert component, and we are calling the “close” method on this ... Read More

How to Automatic Refresh a web page in a fixed time?

Dishebh Bhayana
Updated on 22-Feb-2023 11:29:41

7K+ Views

We can auto-refresh a web page by either using a “meta” tag with the “http-equiv” property, or by using the setInterval() browser API. Automatic refreshing websites have certain use cases to them, for example, while creating a weather-finding web application, we may want to refresh our website after a set interval of time to show the user the near-exact weather data for a location. Let’s look at the 2 approaches below to understand how to set up an auto-refreshing website. Approach 1 In this approach, we will use the “http-equiv” property of a “meta” tag to refresh our web application ... Read More

How to auto-suggest rich content while searching in Google AMP?

Dishebh Bhayana
Updated on 22-Feb-2023 11:28:31

71 Views

To implement auto-suggestion of rich content to the user during the typing of an input field, we will use the “amp-autocomplete” script from the Google AMP framework. Autocompleting an input field implies suggesting relevant content to the user as and when the user starts typing. Let’s discuss the approach with an example, below − Approach We will use the “amp-autocomplete” script to add auto-suggestion of rich content on our webpage. We will also use the “amp-form” script from the Google AMP framework so as to use its amp-form component and display it in the UI, and the “amp-mustache” to give ... Read More

How to auto-adjust font size using CSS?

Dishebh Bhayana
Updated on 22-Feb-2023 11:26:50

703 Views

We can adjust the font size of the text using the “font-size-adjust” property given to us by the CSS. The “font-size-adjust” property allows us to adjust to a common font size regardless of the different font families used in the document if any. With this, we can adjust the font size of the lower-case letters, used in the document, with respect to the font size of the uppercase letters in the document. Syntax font-size-adjust: number | initial | none | inherit | revert | revert-layer | unset “font-size-adjust” can take on many values that are listed above. These values ... Read More

How to author fast-loading HTML pages?

Dishebh Bhayana
Updated on 22-Feb-2023 17:53:50

145 Views

We can optimize our web application in various ways, and cause our web page to load faster, and in a more efficient way, which not only will reduce the load on the web servers, but also increase the SEO rankings of the website. Let’s discuss the different ways through which we can optimize the web page, and understand them with the help of examples. Approach 1: Minimize the File Size as Much as Possible File size should be minimized as much as possible. This can be achieved by trimming unnecessary whitespaces from within the file, removing unnecessary comments, and/or replacing ... Read More

Advertisements