We're pretty consistent about writing block examples as 21.3 Code Listings:
<pre><code class="javascript">
let str = "1 + 1;";
eval(str);
eval(str);
</code></pre>
But as far as I can tell, there's no preferred form for inline code. Many sites use `…` (as seen in e.g. [Source Text Module Records](https://tc39.es/ecma262/#table-exportentry-records)), but that doesn't seem right to me. Many other sites use <code>…</code> (e.g., implementation-approximated), which seems better. But <code>…</code> is also used for references to external files/symbols/etc. (as in e.g. String.prototype.toLowerCase ( ), ShallowestContainedJSONValue, and Shared Memory Guidelines), and it would be nice to distinguish those uses.
I think something like <code class="javascript">…</code> would be ideal, even if the class has no effect on rendering.
We're pretty consistent about writing block examples as 21.3 Code Listings:
But as far as I can tell, there's no preferred form for inline code. Many sites use
`…`(as seen in e.g. [Source Text Module Records](https://tc39.es/ecma262/#table-exportentry-records)), but that doesn't seem right to me. Many other sites use<code>…</code>(e.g., implementation-approximated), which seems better. But<code>…</code>is also used for references to external files/symbols/etc. (as in e.g. String.prototype.toLowerCase ( ), ShallowestContainedJSONValue, and Shared Memory Guidelines), and it would be nice to distinguish those uses.I think something like
<code class="javascript">…</code>would be ideal, even if the class has no effect on rendering.