i need to set a image at 128*128px on a html page. i know the way width=”128px” height=”128px” but are i can do it by write a parameter on image like param=”128px” then he set width and height 128px;
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you give only one argument to the tag it will automatically calculate the second, but it will always maintain the aspect ratio of the image.
If you need to set the w/h to the same in images with ratio different than 1/1 you’ll need to use some javascript to retrieve the height or the width and give the same value to the other argument using JS.