The script that runs is either in HTML or in an external file. This means the canvas element is part of the DOM itself. Flash is just an embedded external file. It uses either the embed element or object element and has no interaction with any other elements. The canvas element is supported by all web browsers by default. But in order to run flash, we need to install plugins in browsers. But the plugins make difficulties like outdated version installs and compatibility with operating systems.Canvas elements make web pages more interactive and dynamic. It adds life to the static elements on the web page like images, text, and graphics by converting them into animated dynamic elements.