Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since июль 2015 г..
* Some parts of this feature may have varying levels of support.
Интерфейс HTMLImageElement предоставляет специальные свойства и методы (расширяя обычный интерфейс HTMLElement ) для управления вёрсткой и отображением элемента <img>.
EventTarget Node Element HTMLElement HTMLImageElementНаследует свойства родителя, HTMLElement.
| align | DOMString | Указывает расположение картинки зависящее от окружающего контента. Возможные значения: "left", "right", "justify", и "center". |
| alt | DOMString | Повторяет атрибут HTML alt указывающий на запасной контекст картинки. |
| border | DOMString | Ширина рамки вокруг картинки. Устарело и вместо него следует использовать свойство CSS border. |
| complete Только для чтения | Boolean | Возвращает true, если браузер закончил загрузку картинки с ошибкой или успешно. Также возвращает true, когда не установлено значение src, во всех остальных случаях - false. |
| crossOrigin | DOMString | Является DOMString, с настройками CORS для этого элемента изображения. Дополнительная информация: Атрибуты настроек CORS. |
| currentSrcТолько для чтения | DOMString | Возвращает DOMString с URL-адресом текущего изображения (что может измениться, например, в ответ на запросы мультимедиа). |
| height | unsigned long | Отражает атрибут height HTML, указывая визуализированную высоту изображения в пикселях CSS. |
| hspace | long | Space to the left and right of the image. |
| isMap | Boolean | Reflects the ismap HTML attribute, indicating that the image is part of a server-side image map. |
| longDesc | DOMString | URI of a long description of the image. |
| lowSrc | DOMString | A reference to a low-quality (but faster to load) copy of the image. |
| name | DOMString | |
| naturalHeight Только для чтения | unsigned long | Intrinsic height of the image in CSS pixels, if it is available; otherwise, 0. |
| naturalWidth Только для чтения | unsigned long | Intrinsic width of the image in CSS pixels, if it is available; otherwise, 0. |
| src | DOMString | Reflects the src HTML attribute, containing the URL of the image. |
| srcset | ||
| useMap | DOMString | Reflects the usemap HTML attribute, containing a partial URL of a map element. |
| vspace | long | Space above and below the image. |
| width | unsigned long | Reflects the width HTML attribute, indicating the rendered width of the image in CSS pixels. |
| x Только для чтения | long | The horizontal offset from the nearest layer. (Mimic an old Netscape 4 behavior) |
| y Только для чтения | long | The vertical offset from the nearest layer. (Mimic an old Netscape 4 behavior) |
Наследует методы родителя, HTMLElement.
HTMLImageElement.Image()The Image() constructor, taking two optional unsigned long, the width and the height of the resource, creates an instance of HTMLImageElement not inserted in a DOM tree.
| HTML # htmlimageelement |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 9 апр. 2026 г. by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.