Question
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,
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 (i.e, 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)
Programming language: Javascript
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started