It would be a good idea to add enough information for machines to understand immediately source code is prolog with both css and schema.org metadata.
<div itemprop="example"
itemscope
itemtype="https://schema.org/SoftwareSourceCode">
<meta itemprop="programmingLanguage" content="Prolog">
<pre><code class="language-prolog">
?- between(3, 5, X).
</code></pre>
</div>