Web Development Articles

Page 142 of 801

How to remove an added list items using JavaScript?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 7K+ Views

In HTML, developers can use the ‘ul’ tag to create a list of items. We can add all related items to the single list. We can also manage the list items using JavaScript. Sometimes, developers require to add or remove list items using JavaScript. We can access the list items using the particular attribute value and use the removechild() method to remove the list item. In this tutorial, we will take the input from the users, and according to the value, we will remove the list item. Syntax Users can follow the syntax below to remove an added list items ...

Read More

How to remove “disabled” attribute from HTML input element using JavaScript?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 4K+ Views

In HTML, we can use input elements to take input from the users by creating a form or in any other way. There are different types of input elements, such as checkboxes, radio buttons, text, numbers, etc. We can use the ‘disabled’ property with every element to disable the input field and stop users from interacting with the input element. In some cases, we require to add and remove the disabled attribute using JavaScript. For example, we want to take the pan card numbers of the users whose age is greater than 18. So, we require to enable the ...

Read More

How to read all spans of a div dynamically?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 1K+ Views

One HTML element can contain multiple nested HTML elements while creating web pages. In some cases, developers may require to read the particular HTML elements of one HTML element. In our case, we require to read all span elements of the div element and extract the content of them. In this tutorial, we will learn to read the content of all spans of a div element using JavaScript and again append it to the web page in the formatted way. Syntax Users can follow the syntax below to read all spans of a div element dynamically using JavaScript. var spans ...

Read More

How to prevent Body from scrolling when a modal is opened using jQuery?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 25K+ Views

A modal is a special user interface that we show on top of all the content of the web page. It is used to show some special information on the web page or move users out from the regular flow of the web page. For example, you may have seen on many websites that subscribe popup box appears on the web page saying to enter your email address to subscribe to the newsletter. Also, the alert box is modal, which doesn’t allow you to interact with the web page content until you close the modal. So, when we show users ...

Read More

How to play a notification sound on websites?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 8K+ Views

Nowadays, web development continues to evolve and find new ways to improve the user experience. One way to improve the user's experience is by adding notifications to the website to notify users of any event. Before we start with the tutorial, let’s understand why we need notifications with sounds on the website. Why Add Notification Sounds? As we said above, notification is used to enhance the user experience. We can use it to notify users for a task, such as when users completes the form submission, get a message in the chat app, for reminders, etc. If users are away ...

Read More

How to place cursor position at end of text in text input field using JavaScript?

Shubham Vora
Shubham Vora
Updated on 17-May-2023 12K+ Views

In HTML, the input field is used to take input from the users. Sometimes, we require to take string or long text messages in the input. In these scenarios, users may need to go to the end of the input field to add more content or message. So, we should set up something such that users can click the button, can go to the end of the input field. In this tutorial, we will learn to use JavaScript to place the cursor position at the end of the text in the input field. Using the setSelectionRange() method The setSelectionRange() method ...

Read More

How to disable resizable property of textarea using CSS?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 16-May-2023 1K+ Views

In CSS we can use the ‘resize’ property to resize the textarea box of a webpage. We can resize the height and width of the textarea box. In case if we set the resize value to none, the textarea box will not resize. In some situations, disabling the resizable functionality of a textbox area in HTML might be accessible if we wish to limit user interactions and control the layout of the input. The size of the text entry is important to the design and the layout of webpage or application is also required. In this article, we will create ...

Read More

How to Design Wave Images in HTML?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 16-May-2023 1K+ Views

HTML has an SVG element that can be used for designing wave images. The wave image shows the unique style of the webpage and it becomes more user interactive while adding the property of animation and transitions to it. The wave design is generally used in the landing page, button, and webpage image. To create the wave image, the SVG element is the best way to design the wave formation. Syntax The SVG element is used to draw the graphics. The viewbox attribute defines the position and dimension of the graphics. The ...

Read More

How to display paragraph elements as inline using CSS?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 16-May-2023 3K+ Views

CSS has internal and inline styles that can be used to display the paragraph element in an inline manner. CSS is a language used for styling the HTML and XML texts. Changing the display property of an HTML element is a typical CSS job. The display attribute of an element indicates how it should be presented, such as block, inline, or inline-block. When displaying a paragraph element inline, the display property must be modified from its default block value to inline. Here we are going to learn how to develop a css code that will display the paragraph elements as ...

Read More

How to display video control in HTML5?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 15-May-2023 502 Views

HTML has embed, object, and iframe tags to display the video control in HTML5. Sometimes we would like to watch a video and pause the video with the stop button but we don’t know what exactly happens to it. The boolean attribute is defined as controls and the attribute includes play, pause, volume, track, fullscreen mode, and subtitle ON/OFF. Visual Representation Syntax The following syntax is used in the examples are − The video element is used to display the video in an HTML document. The source element has src attribute that allows the user ...

Read More
Showing 1411–1420 of 8,006 articles
« Prev 1 140 141 142 143 144 801 Next »
Advertisements