Skip to content

Documentation callouts in HTML and CSS

Three callouts for technical documentation: note, tip and warning.

Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in HTML and CSS

index.html
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Encarts de documentation</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <main class="demo">
      <div class="docs">
        <aside class="docs__item docs__item--note" aria-label="Note">
style.css
:root {
  --doc-text: #042f2e;
  --doc-note: #0f766e;
  --doc-note-bg: #f0fdfa;
  --doc-tip: #6d28d9;
  --doc-tip-bg: #f5f3ff;
  --doc-warn: #b45309;
  --doc-warn-bg: #fffbeb;
  --doc-code: rgb(0 0 0 / 0.07);
  --demo-bg: #ffffff;
  --demo-text: #042f2e;
}

Free component: copy it freely, including for commercial projects.

Toasts and alerts components in HTML and CSS
  • A banner that warns visitors when they lose the network and announces when it is back, using browser events, with no request.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A bell with an unread badge that opens a notification panel: icons by type, read and unread items told apart, and a "Mark all as read" button.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • The four classic interface messages: information, success, warning and error.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A notice warning of a scheduled service interruption, with date, time and impact.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A dashed callout highlighting an offer and its code, with the end date.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • An announcement bar at the top of the page with a link and a button to close it.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component