---
name: "htmlLoad"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/htmlLoad
revid: 369066
updated: 2024-09-02T20:24:56Z
---

# htmlLoad

*Command · GUI Control · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Load HTML from file or URI using given control. File path is relative to current mission dir or an absolute path (with drive letter etc.).
The command is subject to restrictions, imposed by [CfgCommands](../topics/Description.ext.md) class.

> [!NOTE]
> **Arma 3:** Since Arma 3 v2.10 the 'title' attribute is supported within <img> and <a> html tags

> [!IMPORTANT]
> For unknown reasons, URL's length is limited to 255 characters.

## Syntax

```sqf
control htmlLoad filename
```

**Parameters:**

- `control`: [Control](../topics/Control.md)
- `filename`: [String](../topics/String.md) - local file name or remote file URL

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
_control htmlLoad "briefing.html";
```

### Example 2

```sqf
_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
```

### Example 3

Display news item:

```sqf
0 spawn {
    disableSerialization;
    private _html = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscHTML", -1];
    _html ctrlSetBackgroundColor [0,0,0,0.8];
    _html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
    _html ctrlCommit 0;
    _html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
```

## See also

[ctrlHTMLLoaded](../commands/ctrlHTMLLoaded.md) · [loadFile](../commands/loadFile.md) · [preprocessFile](../commands/preprocessFile.md) · [preprocessFileLineNumbers](../commands/preprocessFileLineNumbers.md) · HTML File Format

## Community notes

**BrotherhoodOfHam** — 2014-09-07

[htmlLoad](../commands/htmlLoad.md) works with URLs as well as html files.

---

**Killzone_Kid** — 2014-09-07

While [htmlLoad](../commands/htmlLoad.md) surprisingly does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete.
It is therefore not recommended to use this command in such way.

---

**Benargee** — 2015-04-21

Example use of URL can be found in [BIS_fnc_GUInewsfeed](../functions/BIS_fnc_GUInewsfeed.md) with the function browser.

---

**Tupolov** — 2015-10-07

(Arma 3) In order to use URLs, they must be included in CfgCommands -> allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported:
**Script**

```sqf
_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player;
_ctrlHTML htmlLoad _newsOnline;
```

**Config**

```cpp
class CfgCommands {
    allowedHTMLLoadURIs[] += {
        "http://alivemod.com/alive_news.php*"
    };
};
```

<sub>Source: [BI Community Wiki — htmlLoad](https://community.bistudio.com/wiki/htmlLoad) (revision 369066).</sub>
