Author name: Nancy W

ROTATE IMAGE ON HOVER USING CSS AND JS

ROTATE IMAGE ON HOVER USING CSS AND JS   To rotate an image on hover using CSS and JavaScript, you can follow these steps: HTML Structure: First, create the HTML structure with an image element: Program:   image.html: #image { transition: transform 0.5s ease; } #image:hover { transform: rotate(180deg); } Css: document.getElementById(‘image’).addEventListener(‘mouseover’, function() { this.style.transform …

ROTATE IMAGE ON HOVER USING CSS AND JS Read More »

FILL TEXT BOX WITH A SPRECIFIC TEXT USING HTML

FILL TEXT BOX WITH A SPRECIFIC TEXT USING HTML   To fill a text box with specific text using HTML, you can use the value attribute within an <input> element. Here’s a simple example: Program: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Pre-filled Text Box</title> </head> <body> <input type=”text” value=”This is …

FILL TEXT BOX WITH A SPRECIFIC TEXT USING HTML Read More »

Scroll to Top