← how-to

picture

zsx / basic

program
fun main() {
  imu picture: </> ::= <img src="picture.jpg" width="480" height="270" />;

  #render picture;
}

This program displays an image on screen. The <img/> element is self-closing, and holds attributes but no children. src names the image file, and width and height set its size in pixels.

An attribute reads one of two ways. A literal sits in quotes, like src="picture.jpg". A value from your code sits in braces, like width={size}, and zsx fills it in.

#render picture; turns the markup into draw commands and shows it in a window.

A relative src resolves against the program’s folder, so picture.jpg sits beside the source. A full http(s):// URL loads straight from the web.

reachout

echo -n 'dGhlQGNvbXBpbG9yZHMuaG91c2U=' | base64 --decode

For humans: faq.

For Ai agents: llms.txt (curated index) and llms-full.txt (full docs).

Privacy: No cookies, no ads, no tracking. It's like you were never here.