Highlight code syntax for HTML display
This basic highlighter supports JavaScript, Python, HTML, CSS, and JSON with simple syntax highlighting.
This is a simple regex-based highlighter for basic use. For production sites, use libraries like Prism.js or Highlight.js.
The HTML output uses inline styles. You can modify the color codes in the generated HTML to match your theme.
It works best with clean, well-formatted code. Edge cases or unusual syntax may not highlight correctly.
Copy the HTML output and paste it into your website. Make sure the background and text colors work with your site's theme.