Code Prettify
An embeddable script that makes source-code snippets in HTML prettier.
Dormant0 dependenciesScript tagApache-2.0
Facts
| Size | 16.0 KB minified, 7.3 KB gzipped (src/prettify.js) |
|---|---|
| Licence | Apache-2.0 |
| Dependencies | none |
| Last release | v0.1.0, January 2017 |
| Last activity | 2020-04-21 (Dormant) |
| Stars | 5,748 on GitHub |
| Formats | classic script (global DecorationsT;JobT;SourceSpansT;IN_GLOBAL_SCOPE;HACK_TO_FIX_JS_INCLUDE_PL;PR;prettyPrintOne;prettyPrint;PR_SHOULD_USE_CONTINUATION) |
| CDN hits | 144,814 a month on jsDelivr |
| npm downloads | 53,949 a month |
| Gates | G1 passed (no runtime dependencies); G2 passed (loads in a browser as it is); G3 passed (no compile-only entry points); G4 passed (open-source licence); G5 failed (not archived or deprecated). Smoke test on v0.1.0 in headless Chromium, 2026-10-30 |
Load it
Pin the version. The hash is computed from the file jsDelivr serves, so a changed file fails to load instead of running.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/prettify.js"
integrity="sha384-zU9URL3FT5CwJTvxMj/wt/JAECum3qRIBXKACIoS3PQa6FoWgecbfK1pvfJbLzI8" crossorigin="anonymous"></script>Advertisement
Related libraries
- Notus – Web Notifications Widget Yet another JavaScript pop-up notification library for the web.
- Speckle.js A JavaScript plugin that adds responsive, stylized speckles to any element; with no dependencies.
- Roar A zero-dependency, vanilla JavaScript alert/confirm replacement.
Entry 19 in the directory. Facts refreshed monthly; last run 2026-10-30.