Step 3: Now lastly under the final . All the icons in the icon libraries below, are scalable vector icons that can be customized with CSS (size, color, shadow, etc.) The lower value, the more transparent: The CSS filter property adds visual effects (like blur and saturation) to an element. name in the src attribute: Some web sites point to an image on another server. How to react to a students panic attack in an oral exam? How to add an image in a HTML page using javascript ? While using W3Schools, you agree to have read and accepted our, Defines a clickable area inside an image map, Defines a container for multiple image resources, alt - Specifies an alternate text for the image. Get certifiedby completinga course today! You can use the style attribute to specify the width and Try it function myFunction () { document.getElementById ("demo").innerHTML = "Hello World"; var i = true; if (i) { document.getElementById ("img").src = "https://www.w3schools.com/css/trolltunga.jpg"; } else { document.getElementById ("img").src = "http://wallpaper- Get certifiedby completinga course today! If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: W3Schools is optimized for learning and training. You can do that either by referencing an image that has already been loaded in the DOM or by creating a new image using the Image () constructor. Then I added two webpages, one of which contained a