How to resize images using HTML?

Solved
gro -  
 Sniper25 -

Hello,

I'm currently creating a photo library on a website and I would like all the photos I display to be reduced by 50%, for example.

How can I do this?

I tried this:

  <img src="blabla.jpg" height="50%" width="50%">


but the image then becomes 50% of the height and width of the page!

Should I use CSS properties?

2 answers

ouafff9
 
<img src="ton_image.JPG" height="352" width="470" >

I posted this link and it works perfectly, so I don't see what the problem is... sorry.
229
sebsauvage Posted messages 33415 Status Moderator 15 667
 
And your values 352 and 470, where did you get them from? From the image?
So you had to read the image, then generate the corresponding HTML code.

He wanted the HTML code to automatically display images at 50% of their original size, which is not possible with HTML alone: it is absolutely necessary to read the dimensions of the image in order to put the correct values in width and height.
0
gterhbtrdnfg
 
thank you, my ball
1