Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to use the div tag in HTML, CSS, JS to make an image in your repl.
DigitCommander (39)

First you have to upload an image from the three vertical dots and click 'Upload File' (nothing upwards of 7+ for the age requirements, please)

Then you use this script:

This is a very basic script. The alt function is when the main file can't load. A
lthough if you wanted to adjust the dimensions of the file (height and width), you would need to do this:

That adjusts the height and width of the file.

NOTE: Do not forget the <div class="card"> otherwise it will not work.

This is my first time posting a tutorial on the talk page, so I hope you found this useful! Please feel free to write feedback in the comments and upvote this.

  • DigitCommander
NathanMcpherson (0)

how do you stlye a div???

DigitCommander (39)


<div class="card"> <img src="example here.extension here" alt="example here.extension here" (THIS is where you style a div) style="width:__%""height=__%"> </div>