Question: Create your first JavaScript application using Visual Studio Code and the following directions: Create a new folder called Week 1 Open the folder in Visual

Create your first JavaScript application using Visual Studio Code and the following directions:
Create a new folder called Week1
Open the folder in Visual Studio Code
Create a home.html page
Create a css folder and a file in it with a name of styles.css
Create a js folder and a file called main.js within the folder
On the html page, in the head, add a reference to your css file and a script tag referencing your JavaScript file
Add a div tag with the ID of ball
In css, change the background color to any color or image that you like
For the ball, make the dimensions (width,height)50px by 50px
Make the ball round and give it a position of relative
In JavaScript, make it so the ball moves on the screen by 20px if you hit the cursor keys (left or right) and log to the console every time the ball moves

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!