Dev Helpers
← Back

Place list markers within the text flow

Place list markers within the text flow with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    list-style: disc inside;
    padding-inline-start: 0.75rem;
    max-width: 20ch;
  }
</style>
<ul class="demo">
  <li>A longer list item that wraps.</li>
  <li>Next item</li>
</ul>