CodingTrain / CodingTrain/Suggestion-Box

javascript into html

Open
#977 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

I am trying to create a javascript game because it can somehow link to html. So far I tried making the canvas in java script pop up but i only saw a white screen. I just started learning html and atm I want all my code to be in java and just use html to place it on the webpage.
here my html:
`

Space Invaders


`

i'm trying to link this page to my js

here my js
`function setup(){
createCanvas(400,400);
}
function draw(){
background(0);
}`

i'm wanting a 400 by 400 screen to appear on the web page with the background in the square being 0. Can someone tell me why this not working?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.