Ask coding questions

← Back to all posts
how to do you resize a picture?
gerrardwrx (21)

I'm doing my first challenge and i've used the picture provided for the challenge, would anyone be willing to give some tips on how to resize a picture so its smaller

Answered by EthanJustice (31) [earned 5 cycles]
View Answer
EthanJustice (31)

Take a look at this. Try using a height or width attribute to set the size of the picture. That's just a hint! If you need more just ask!

EthanJustice (31)

@AmandaAhern Set your image element to
<img src="[email protected]_V1_.jpg" alt="student" height="100px" width="100px" />

Change the values within the height and width attributes into whatever your like, such as 50px or 2cm. See the MDN on Pixels or the Width and Height section on the previous link. Hope this helps, and apologies for the late reply. If you need any more information feel free to ask!

AmandaAhern (0)

@EthanJustice how do make an image a backround?

PoppyShacklefor (0)

@EthanJustice Thank you so much now it works!! YAY 😁

ahsir (0)

thank you so much