details-before.html (508B)
1 <!DOCTYPE html> 2 <!-- Any copyright is dedicated to the Public Domain. 3 - http://creativecommons.org/publicdomain/zero/1.0/ --> 4 <head> 5 <style> 6 summary { 7 list-style-type: none; 8 } 9 details::before { 10 content: "This is the details."; 11 /* Match the margins and display of <p> */ 12 display: block; 13 margin-block-start: 1em; 14 margin-block-end: 1em; 15 } 16 </style> 17 </head> 18 <html> 19 <body> 20 <details> 21 <summary>Summary</summary> 22 </details> 23 </body> 24 </html>