Question: Write in HTML JavaScript language 1. Create an HTML file named as your first name (use our template to create this file). a. Create a
1. Create an HTML file named as your first name (use our template to create this file). a. Create a button with label "Add element", that would invoke a function from your JavaScript 2. Create a JavaScript file named as your studentid.js (ie, 123123123.js) a. Create a function that would be invoked when "Add element" button is clicked. This function should prompt user to enter the type of element he/she would like created (i.e, p for paragraph, div, nav, section, footer...), then create the element with text (i.e "paragraph element", "div element".... ) and append it as a child to the body of your document. You can apply an appropriate style of your choice to this newly created element (background color/border/font/color)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
