Silvio Peroni <silvio.per...@unibo.it> writes: > Hi Marynas, > > first of all, thanks for your comments! > > A couple of answers, motivating why we didn’t originally choose to use the > HTML elements you suggested: > >> A couple remarks regarding HTML: >> <p class="code"> could be <pre><code> >> http://www.w3.org/TR/html401/struct/text.html#edef-CODE >> <http://www.w3.org/TR/html401/struct/text.html#edef-CODE> > > Basically, it was made on purpose as a design choice. In RASH we wanted to > keep everything much easier, in particular when defining similar behaviour in > different contexts (e.g., in inline elements and in block elements). If we use > the full HTML approach as you suggested, I should use different tags for > defining codes. In particular: > > Inline code definition: > <p>This text contains a <i><code>call to a function in italics</code></i> as > an inline element.</p> > > Block code definition: > <pre><code>This is a full block of code</code></pre> > > As you can see, to have both situations I should use at least two additional > elements of HTML (and thus I should have to extend RASH). In addition, to > define block code, I should use *two* elements together.
Still, the <pre><code> combination is recommended in the HTML5 documentation. And tools like prism.js, for instance, support it out-of-the-box. Simple is important, but not if it introduces complexity elsewhere. Phil