0

What two attributes can be use to resize image inside html code

8th Mar 2021, 1:07 PM
BIGSTAR⭐
BIGSTAR⭐ - avatar
6 Respostas
8th Mar 2021, 3:04 PM
Matias
Matias - avatar
+ 1
height and width
8th Mar 2021, 1:13 PM
Shashank Trivedi
Shashank Trivedi - avatar
+ 1
height and width, but it's recommanded to use css properties rather than element attributes (same name in this case)
8th Mar 2021, 1:30 PM
visph
visph - avatar
+ 1
<img src="Image url" alt="alternative text" width="100%" <!-- Makes the image cover the web-width completely --> height="auto" <!-- keeps the image height to width ratio constant --> /> so we use height and width attribute to change the size of our inserted image. width="100%" height="auto" is the best size. You would be able to specify width and height with: cm = centimeter mm = millimeter px = pixel in = inch Q = a quarter of millimeter pc = pica pt = point cap = capital (letter) height em = 16px ex = 8px ch = 10px lh = line-height ic = glyph in font rem = root element rlh = root element line-height vw = viewport width vh = viewport height vb = initial containing block, in the direction of root element's block axis vi = initial containing block, in the direction of root element's block axis vmin = minimum viewport height and width vmax = maximum vw and vh Sorry that I can't explain them all
18th Mar 2021, 12:52 PM
đŸ‡źđŸ‡± Radin Masiha đŸ‡źđŸ‡±
đŸ‡źđŸ‡± Radin Masiha đŸ‡źđŸ‡± - avatar
+ 1
height and with attribute must be filled with only number if you want to specify pixels, and with '%' ending for percentage of container size... height and width css properties could have more units, and px should end the number if you want to specify pixels size...
18th Mar 2021, 12:59 PM
visph
visph - avatar
0
Inside html code, You can add inline style: <img src = "Image URL address" style = "height:160px; width:300px;"/> With attribute: <img src = "Image URL address" height = "160px" width = "300px"
9th Mar 2021, 4:52 AM
Samin Sakur
Samin Sakur - avatar