Captioned List Example

Author: Justin Martin

Comments: The caption can be styled as you wish, and need not necessarily be display: block;. The primary advantage of using captions, in this way, is that you need not clutter your markup structure with extraneous elements, unrelated to your data.

<ul class="captioned" title="Example Caption">
 <li>Item 1</li>
 <li>Item 2</li>

ul.captioned[title]:before {
 content: attr(title);
 display: block;