Found 2556 Articles for HTML

How to Change Background Color According to the Mouse Location using JavaScript?

Aayush Mohan Sinha
Updated on 12-Sep-2023 15:13:01

487 Views

JavaScript is a famous programming language that is one of the core languages of the World Wide Web (WWW) alongside HTML and CSS. It allows the programmer to capture events and modify the Document Object Model (DOM). In this article we are going to see how we can make use of JavaScript to change the background color according to the location of the mouse cursor. Mousemove Event The mousemove is an event which gets fired at an element when the cursor of the mouse is moved, and it is still inside the element of concern. It gives us information about ... Read More

How to Change an HTML Element Name Using jQuery?

Aayush Mohan Sinha
Updated on 12-Sep-2023 15:08:41

474 Views

jQuery is a JavaScript library created to make event handling, CSS animation, Ajax, and DOM tree navigation and manipulation easier. In this article we are going to see how we can change the name of an element using jQuery. Algorithm We are going to follow a three−way procedure to change the name of any element using jQuery: Identify and select the element we want to change. Copy all the attributes of the selected element to a temporary object. Create a new element with the new name and copy all the attributes to it. Replace the old element with this ... Read More

How to Change a Button Text on Click Using LocalStorage in Javascript?

Aayush Mohan Sinha
Updated on 12-Sep-2023 15:05:21

219 Views

JavaScript is a famous programming language that is one of the core languages of the World Wide Web (WWW) alongside HTML and CSS. It allows the programmer to capture events and modify the Document Object Model (DOM). In this article we are going to see how we can make use of JavaScript to change the text of the button whenever it is clicked with the help of localStorage. localStorage The localStorage is a read−only property of the window interface that allows the user to store data. The saved information is kept between browser sessions. The localStorage property is like sessionStorage, ... Read More

What is the Difference Between <b> and <strong> , <i> and <em> Tags?

Eesha Gandhi
Updated on 12-Sep-2023 13:10:18

197 Views

In this article we will discuss the differences between the and tags, and tags and look at some examples which use these tags. and tags The HTML element is used to draw the reader's attention to elements whose contents are otherwise unimportant. It highlights a section of text in bold to make it more visible to the user. It's a fashion statement. It conveys no additional significance. As a result, if we only need to increase the font-weight of a specific word, phrase, or paragraph for presentation purposes, we should use the ... Read More

How do I Display Images From Another Origin in My Angular Web Application?

Eesha Gandhi
Updated on 12-Sep-2023 13:08:22

203 Views

Using the Assets Directory We can serve an image in angular by first placing it in our project's assets directory, where we can create a separate directory for images or simply leave it in the assets directory as is. We can open the specific component typescript (.ts) file where we want to serve the image once we have placed all of the required images in the assets directory. Now we can store the image's URL in a variable within the function Object() { [native code] } so that it is initialised when the component is created. Demo.Component.ts import { Component, ... Read More

How do you Put Space between Two Objects in the Same Row?

Eesha Gandhi
Updated on 12-Sep-2023 13:06:09

111 Views

Using Margin and Padding Properties Additional spacing can be added to the top, right, bottom, or left of any HTML element. However, before deciding on the type of space to add around the element or object, it is important to understand the difference between margin and padding. Padding is used to surround the element within the border whereas the margin is used for surrounding the element outside the border. The margin property specifies the amount of space around an HTML element. We can use negative values to overlap content. The child elements do not inherit the values of the margin ... Read More

How to Auto Checked the Checkbox and Auto Display the Results When Checked

Eesha Gandhi
Updated on 12-Sep-2023 13:02:31

313 Views

A checkbox is created by using the tag with the type="checkbox" attribute (also called a tickbox). Users can select multiple options by checking one or more checkboxes. In HTML, the checkbox can be used alone or in conjunction with the "form" attribute. When the question or form is submitted, the data from the checked checkboxes is collected and saved in the backend. The type attribute of the element creates it, as shown in the following syntax: Checkboxes with clickable labels are more usable. It allows users to toggle checkboxes on and off by clicking the labels. ... Read More

How to Reduce Space Between Elements on a Row in CSS Bootstrap?

Eesha Gandhi
Updated on 12-Sep-2023 12:57:56

516 Views

Bootstrap grid system lays out and aligns content using a series of containers, rows, and columns. It is responsive and built with flexbox. It supports up to 12 columns per page. If we don't want to use all 12 columns individually, we can group them together to make wider columns. The grid system in Bootstrap is responsive which means that the columns will re-arrange based on screen size: On a large screen, the content may look better organized in three columns, but on a small screen, the content items should be stacked on top of each other. There are four ... Read More

HTML Docs Not Updating from CSS

Eesha Gandhi
Updated on 12-Sep-2023 12:55:20

209 Views

Web pages are made using a variety of fundamental technologies, HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets) being the primary ones. HTML provides structure to the page, while CSS is responsible for the (visual and aural) layout for a variety of devices. CSS can be added to HTML documents in three different ways: Inline - when the attribute is used within HTML elements. Internal – when a element is inserted into the section. External – when an external CSS file is linked to HTML code using the element. Suppose you are making a Django ... Read More

How to Automatically Open the Detail Menu on Search for Buttons?

Eesha Gandhi
Updated on 12-Sep-2023 12:53:45

37 Views

Buttons are clickable elements in HTML that perform actions. They have the ability to submit a form, reset a form, or perform a JavaScript function. They are defined by the or tags. Buttons created using the tag can hold content such as text, icons, images, and so on. The tag specifies a data entry field for the user. The most important form element is the element. Depending on the type attribute, it can be displayed in a variety of ways. Text is the most common and widely used input type. Consider the code below, which ... Read More

Previous 1 ... 3 4 5 6 7 ... 256 Next
Advertisements