Found 11336 Articles for Web Development

How to use text-overflow in a table cell?

Abhishek
Updated on 20-Nov-2023 18:39:22

162 Views

The text-overflow property in CSS is used to handle the overflown text on the web page. This property helps us to show the overflown text in a specific way. The text-overflow property is used with two more other properties with fixed value to show overflowed text in a specific manner and those properties are white-space: nowrap; and overflow: hidden; with the given values. Once these properties are set on the element, we can use the text-overflow property with different values as written below − clip − It is the default value of this property in which the overflowed text ... Read More

How to use text as background using CSS?

Abhishek
Updated on 20-Nov-2023 18:36:34

217 Views

In general, we use text in foreground not as background because text is the most important thing for any website and organizing text on frontend with good visibility, readability and fonts to show the users is also important. But sometimes, you need to show the text as background for other text or HTML element with some content. In that case you can use the z-index property of CSS with different properties to show text as background. There are two different ways of using the z-index property with other properties and selectors to show text as background using CSS as listed ... Read More

How to use SVG with :before or :after pseudo element?

Abhishek
Updated on 20-Nov-2023 17:59:50

618 Views

The :before and :after pseudo elements are used to add the content just before the start of an HTML element and just at the end of the same or any other element. These pseudo selectors help to add content or any other effect without using the un-necessary elements in the HTML DOM. You can add content or any color and CSS effects on the element using these selectors. The :before selector as the name suggests will add the content before the element and the :after element will add the content after the element. You can add any image, color, background ... Read More

How to use simple API using AJAX?

Abhishek
Updated on 20-Nov-2023 17:54:04

53 Views

AJAX or Asynchronous JavaScript and XML is a set of existing technologies like: Asynchronous JavaScript and XML. AJAX helps us to fetch the data from any local database or any API without interfering with the existing page. It will fetch the data without reloading the page and without any interruptions. Process of sending the AJAX request to any server. Step 1 − In the first step, we will instantiate a XHR object using the XMLHttpRequest() as shown below − const xhr = new XMLHttpRequest(); Step 2 − In the next step, we will open the ... Read More

How to use font-feature-settings property in CSS?

Abhishek
Updated on 20-Nov-2023 17:49:25

71 Views

The font-feature-settings property is used to control the advance typographic features in open type fonts. The advance typographic features like swashes, small caps and the ligatures can be controlled using the font-feature settings property of CSS. The font-feature-settings property is used by passing two different values as listed below − The first value is the property is used to define the open tyoe feature tags like: "smcp" (small caps), "swsh" (swash). It also has some global values like: "inherit", "initial", and "unset". The second value that is passed to this property will almost be in the form of binary ... Read More

How to use font-variant-settings property in CSS?

Abhishek
Updated on 20-Nov-2023 17:46:59

57 Views

CSS is a way of styling the web pages according to the consumer needs and the design you want. It provides a lot of properties to style our components or pages. The font-variant-settings is also one of those properties that is provided by CSS to style our web pages. The font-variant-settings property provides users a good and healthy low-level control over the fonts with different characteristics and properties. Using font-variant-settings property in CSS The font-variant-settings property can be used in three different ways by giving different types of values to it. The different ways of using this property are explained ... Read More

How to use font awesome icon as a cursor?

Abhishek
Updated on 20-Nov-2023 17:40:04

94 Views

In general, we see the design of cursor on any web page as an arrow by default or we can change the type of cursor to a particular type using cursor property of the CSS and assign it any kind of cursor of our choice such as pointer, grab, zoom in, zoom out etc. But, did you know? That we can change the type of cursor to any other type then the ones provided by the CSS. It is possible, as we can use any image to assign the design style to a cursor and can use any font-awesome icon ... Read More

How to Sort Numeric Array using JavaScript?

Abhishek
Updated on 20-Nov-2023 17:36:28

346 Views

In this article, we are going to learn about the methods of sorting a numerical array in JavaScript. Sorting of an array means to arrange the elements of an array in a particular order i.e. they can be in ascending or the increasing order and they can be arranged in descending or the decreasing order. There are two ways in which we can sort a numeric array in a particular order in JavaScript − By traversing array with the help of loops By using the sort() method available in JavaScript Let us discuss both of the above methods ... Read More

How to sort HTML elements by data-attribute?

Abhishek
Updated on 20-Nov-2023 17:31:52

146 Views

In this article, we are going to learn about the ways of sorting the child elements of an element in the HTML document with the help of data attribute. The are many data attribute available in HTML to use. We can sort the elements by using any of those data attributes. In this article, we will sort the elements with the help of two different data attributes, where one will sort the elements according to the length of the value given to it and another will sort according to the numerical values. The data attributes are listed below − ... Read More

How to sort element by numerical value of data attribute using JavaScript?

Abhishek
Updated on 20-Nov-2023 17:20:51

119 Views

Generally, we sort arrays, objects and some other data types using some method of JavaScript. But, in this article, we are going to sort the child elements of an element whose values are in unsorted order using the data attribute of those child elements. In this article, we are going to learn about the two different ways or methods of sorting the child elements according to the value of their data attribute given to them. The methods we use to sort are listed below − By selecting the value of data attribute using the getAttribute() method. By selecting the ... Read More

Previous 1 ... 4 5 6 7 8 ... 1134 Next
Advertisements