> For the complete documentation index, see [llms.txt](https://normal-tangerine8609.gitbook.io/html-widget/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://normal-tangerine8609.gitbook.io/html-widget/components/less-than-img-greater-than.md).

# \<img>

About The Img Tag

```html
<widget>
  <img src="https://raw.githubusercontent.com/Normal-Tangerine8609/Scriptable-HTML-Widget/main/images/logo.jpeg"/>
</widget>
```

The `<img>` element defines a widget image element. It is a self-closing tag, meaning you do not need a second closing tag but it must be marked with a forwardslash at the end.

### **Attributes**

**src - image**

Defines the image. All `<img>` elements must have a `src` attribute. This attribute cannot be set with css.

**borderColor - colour**

Defines the border color.

**borderWidth - posInt**

Defines the border width.

**cornerRadius - posInt**

Defines the corner radius.

**imageOpacity - decimal**

Defines the opacity of the image.

**imageSize - size**

Defines the size of the image.

**tintColor - colour**

Defines the tint color.

**url - url**

Defines the image URL.

**contentMode - contentMode**

Defines the content mode of the image (`filling` or `fitting`).

**alignImage - alignImage**

Defines the horizontal alignment of the image.

**resizable - bool**

On `true`, it does not allow the image to be resizable.
