How can I create a html and js code with these conditions:
3 different modes will be used to add the input number to the div
1. When you press “Enter” in the input or when you click the “Add” button with the left mouse button, a paragraph with text-align “left” should be added2. When we press “Shift” in the input or when we click the “Add” button with the middle mouse button, a paragraph with text-align “center” will be added to the div3. When we press “Alt” in the input or when we click the “Add” button with the right mouse button, a text-align “right” paragraph will be added to the div
• When you click on each paragraph within the div, the paragraph will get a background-color and will increase font-size.
• Whenever we press “SHIFT – A” the sum of all numbers will be calculated and displayed at the bottom of the page.
• After adding each number the data will be stored in localstorage and when the page opens this data will reappear on the page