HTML | DOM image naturalHeight property
naturalHeight : This property is used to get the original height of an image. Since the height of an image to be displayed on the webpage can be modified using the ‘height’ attribute in the <img> tag, hence the naturalHeight property becomes useful in situations where the original height of the image is required rather than the customized one and it is a read-only property.
Return Value: It returns the original height of an image in pixels.
- Supported browsers :
- Google Chrome
- Internet Explorer 9.0 or above
- Mozilla Firefox
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.