I’d recommend using similar markup to SC here, modern HTML has some nice guidelines for this sort of thing.
As a rule use <p>
for subheading-type things unless it is considered navigation, in which case use <ul>
.
In this case, as these are not arbitrary bits of text to expand the heading, but rather, steps in a hierarchical structure, I think <ul>
is more semantic.
But either is fine (or <div>
or <span>
). But you should definitely use <h1>
for your main heading (or <h2>
if there are multiple suttas on a page.)
Also, don’t use <br/>
what is this, 2005? ![:laughing: :laughing:](https://discourse.suttacentral.net/images/emoji/twitter/laughing.png?v=12)
TBH you don’t need classes for the verses, the lang
attributes let you select them for styling just fine (.verse:lang[pi]
).
But you can use them for the heading if you like. Personally I’d try without to start with and see if I could get away with using CSS selectors to achieve the same thing. But that’s just me, I like using plain tags where I can, but there’s definitely an argument that we should class all the things.
Also I’d recommend wrapping each “sutta” in an <article>
tag with the sutta id on it. An <article>
represents a distinct, self-contained “thing”.
While we’re at it, technically a <section>
tag might be better than <div>
for the verses, as it essential means “a part of a larger thing”.
<article id="thig4.1">
<header>
<a href="https://suttacentral.net/thig4.1/en/sujato#thig4.1:1.1">Thig4.1:1.1 </a>
<ul lang="pi" translate="no">
<li class="book">Therīgāthā</li>
<li class="part">Catukkanipāta</li>
<li class="title">1. Bhaddākāpilānītherīgāthā</li>
</ul>
<ul lang="en">
<li class="book">Verses of the Senior Nuns</li>
<li class="part">The Book of the Fours</li>
</ul>
<h1 class="title" lang="en">4.1. Bhaddā Kāpilānī</h1>
</div>
</header>
<section class="verse" id="thig4.1:1">
<a href="https://suttacentral.net/thig4.1/en/sujato#thig4.1:1.1">Thig4.1:1.1 </a>
<p lang="pi" translate="no">
“Putto buddhassa dāyādo,<br>
kassapo susamāhito;<br>
Pubbenivāsaṁ yovedi,<br>
saggāpāyañca passati.</p>
<p lang="en">
Kassapa is the son and heir of the Buddha, <br>
whose mind is immersed in samādhi.<br>
He knows his past lives,<br>
he sees heaven and places of loss,</p>
</section>
</article>