</> ConvertAtlas Developer Tools
Bootstrap 5 · Beginner

Highlighted CSS Block

A CSS code block with syntax highlighting, via Prism.

Requires Bootstrap 5, Prism. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-tomorrow.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"></script>
<div class="card border-0 shadow" style="width:400px;max-width:100%"><div class="card-body p-0"><pre class="mb-0"><code class="language-css">.btn {
  background: linear-gradient(135deg, #ff7a18, #ff477e);
  border-radius: 12px;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }</code></pre></div></div>
Prism.highlightAll();
Free to use.This component uses Bootstrap 5, Prism (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.