I am doing a redesign and have some previously existing content in HTML that is similar to
<p class="testimonial-text">Bacon ipsum dolor sit amet aliquip est tail occaecat bacon ad qui short loin exercitation.Strip steak sint dolore et ut, elit kielbasa quis.</p>
–<span class="person-name">Name Surname</span>
<hr />
And those classes were manually added to every testimonial. So I have so far wrapped everything in a <div id="testimonials">
and then every testimonial is wrapped in a div
because I wanted to leverage inheritance so that a new testimonial later did not need the classes nor the <hr />
but of course to prevent a future <div>
within the <div>
that might be necessary in the future by another dev, I decided to use > p
. How do these classes look for keeping code as lean as possible?
HTML
<div id=testimonials>
<div>
<p>Frankfurter meatloaf quis chuck, sunt jerky voluptate veniam ex aute commodo duis laboris labore. Sint dolor enim boudin pancetta culpa ham hock, laboris brisket veniam doner short loin velit qui duis.</p>
&ndash <span>Piggy McPiggy</span>
</div>
<div>
<p>Frankfurter meatloaf quis chuck, sunt jerky voluptate veniam ex aute commodo duis laboris labore. Sint dolor enim boudin pancetta culpa ham hock, laboris brisket veniam doner short loin velit qui duis.</p>
&ndash <span>Oinky Sausagebreath</span>
</div>
<div>
<p>Frankfurter meatloaf quis chuck, sunt jerky voluptate veniam ex aute commodo duis laboris labore. Sint dolor enim boudin pancetta culpa ham hock, laboris brisket veniam doner short loin velit qui duis.</p>
&ndash <span>Pigster Pickled</span>
</div>
</div> <!-- END OF TESTIMONIALS-->
CSS
div#testimonials > div {
border-bottom: solid 1px #666;
}
div#testimonials p {
font-size: 16px;
}
div#testimonials span {
font-weight: bold;
color: red;
}
My concern is that if we perhaps need to add a span in the paragraph, that I might need to do something else to make sure that the persons name is still styled as intended. Something about this just does not seem Kosher.