New here. Had a question about images

Hi. Specifically, my question is how to resize a specific image. The code I have now is resizing every image, and I only want to resize one. Thanks

Code I have right now: img { width: 200px; height: 200px; }

1 Like


you can assign an id to an element, and then reference this element by the id to add styles for that element alone:

<img id="image" src="sourceofimagehere" />

and then in your css file

#image {
  height: 200px;
  width: 200px;

Have a read on the id attribute: id - HTML: HyperText Markup Language | MDN

Note that ids are unique and you can only assign an id to a single element.


Thank you for your help