🌍 Public
Viewing a saved revision (read-only)
6b603e9b6e6b4660bcd7f1d6ab63a04f
Syntax Highlighting for Print
This example shows how to render JavaScript source code as a styled, print-ready image using syntax highlighting. It uses Prism.js to apply Solarized Light syntax highlighting and line numbers to a code snippet from a D3 visualization. The styling, including a custom font and rounded border, is achieved with CSS. The code itself demonstrates the `renderCircles` function, which uses `selectAll`, `data`, and `join` to bind and update circle elements.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.