# Assessment help needed with HTML image task 1

**URL:** <https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053>\
**Category:** Learn\
**Tags:** learning\
**Created:** [June 29, 2022, 3:43am UTC](https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053 "2022-06-29T03:43:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Aditya\_Ramachandran](https://discourse.mozilla.org/u/Aditya_Ramachandran)\
**Post date:** [June 29, 2022, 3:43am UTC](https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053/1 "2022-06-29T03:43:28Z")

</div>

Hello!  
I am not able to come up with a solution for a particular question in Task 1, like I am not able to understand how to calculate the aspect ratio for an image.

The question:

- Give the `<img>` element an appropriate `width` and `height` so that it displays at the correct aspect ratio, and enough space is left on the page to display it. The image’s intrinsic size is 615 x 419 pixels.\*

[Link to the original assessment](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML/Test_your_skills:_HTML_images#task_1)

Any help would be appreciated!  
Thank you!

---

<div class="post-metadata">

**Author:** ![umarFaruq](https://avatars.discourse-cdn.com/v4/letter/u/8491ac/32.png) [@umarFaruq](https://discourse.mozilla.org/u/umarFaruq)\
**Post date:** [June 29, 2022, 9:34am UTC](https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053/2 "2022-06-29T09:34:24Z")

</div>

@Aditya_Ramachandran Hope you are well,

Here’s what I’ve done in my exercise for this assessment which was assessed as correct by fellow members.

`<img src="images/blueberries.jpg" width="615" height="419">`.

That means you have to add both `width` and `height` attribute. whose value is `615` and `419` in order, which is the actual **aspect ratio** you wanted to understand.

Hope that helps.  
Have a nice day.

@mikoMK what do you think I did it right or not?

---

<div class="post-metadata">

**Author:** ![Aditya\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Aditya\_Ramachandran](https://discourse.mozilla.org/u/Aditya_Ramachandran)\
**Post date:** [June 29, 2022, 11:50am UTC](https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053/3 "2022-06-29T11:50:56Z")

</div>

@umarFaruq Thank you so much for your response  
I did understand the solution!

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [June 29, 2022, 1:43pm UTC](https://discourse.mozilla.org/t/assessment-help-needed-with-html-image-task-1/99053/4 "2022-06-29T13:43:04Z")

</div>

hi all

Thanks @umarFaruq for helping out. 🙂

> [@umarFaruq](#):
>
> @mikoMK what do you think I did it right or not?

Yes, that’s correct. When we set width and height to the same as the image itself, the aspect ratio is automatically right.

Cheers,  
Michael
