# Inputs and outputs

If you want to ask the user to insert a value, you have to use `<prompt>` element. The optional message is specified by the id:

```markup
<h2 id="foo">
    <prompt id="Please insert a value for foo: ">
    </prompt>
</h2>
```

this code is compiled as:

```javascript
foo = prompt('Please insert a value for foo: ');
```

Outputs are displayed with `<cite>` element:

```markup
<cite>
    <b id="+">
        <p>Foo now has value: </p>
        <p id="foo"></p>
    </b>
</cite>
```

Which is compiled as an `alert()` function:

```javascript
alert(('Foo has new value: ' + foo))
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://roveroniandrea.gitbook.io/htpl-compiler/syntax/inputs-and-outputs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
