Html//1: Element with attribute without value

I need to have a “download” attribute without a value in an “a” element in html//1. What is the way to code that? Attributes are supposed to be Name=Value or Name(Value) and I don’t really have a Value at that point.

Thanks

a([href(...), ...)], []).

I.e., use [] as content.

I have content for the second argument of a/2. “download” is an attribute so it would be contained in the first argument. It doesn’t have a value associated with it, i.e. there’s nothing to go after the = sign.

I can try:

a([href(…),download],…).

but I don’t expect it to work because an attribute is supposed to be Name(Value) or Name=Value. Is a simple atom supported there?

That actually works:

104 ?- phrase(html(a([href(x),download], [])), Tokens), print_html(Tokens).
<a href="x" download></a>
Tokens = [<, a, ' ', href, '="', x, '"', ' ', download|…].