Guide
Add Programming Language Icons to a Web Page Using Devicon
Learn how to add Devicon programming‑language icons to a web page using a CSS stylesheet, proper class names, and verification steps.
Published by Tasadduq Burney
29 Oct 2025, 10:46 UTC
3 min109.8K views0

Desired outcome
Display a programming‑language logo (e.g., Python, JavaScript) inline with text by using the Devicon icon set via CSS classes.
Necessary prerequisites
- An HTML file that you can edit (or a template in your web project).
- Access to the internet to load the Devicon stylesheet from a CDN, or a local copy if you prefer to self‑host.
- Basic familiarity with editing HTML and opening browser developer tools.
Focused procedure
- Include the Devicon stylesheet. Add one of the following lines inside the
<head>section of your HTML. Use the exact version shown or a newer release if available.
If you manage dependencies with npm, you can install the package and import its CSS:<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/devicon@2.15.1/devicon.min.css">npm install devicon@2.15.1 # then in your build step import "devicon/devicon.min.css" - Place an inline element for the icon. Choose the appropriate class name for the language you want. For a plain‑style Python icon use
devicon-python-plain; for the standard JavaScript logo usedevicon-javascript. Insert an<i>or<span>where you want the icon to appear.<i class="devicon devicon-python-plain"></i> Python <i class="devicon devicon-javascript"></i> JavaScript - Adjust size or color (optional). Devicon provides utility classes for size, e.g.,
devicon-lgfor a larger icon. You can also override with custom CSS.
Or set color directly:<i class="devicon devicon-python-plain devicon-lg"></i><i class="devicon devicon-python-plain" style="font-size:2rem; color:#3776AB;"></i> - Save and reload the page. The icon should appear next to the accompanying text.
Expected checks
- Open the page in a browser and visually confirm that each icon renders with the correct logo and colors.
- Open Developer Tools (usually F12) and select the icon element. In the "Computed" tab verify that the
font-familyincludes "Devicon". In the "Styles" pane you should see a::beforepseudo‑element whose content matches the Unicode glyph for the chosen icon. - Check the Network tab: the request for
devicon.min.cssshould return status 200, and any font files (e.g.,devicon.woff2) should also load with 200 responses. No 404 errors for the stylesheet or fonts should be present.
Recovery options (if the icon does not appear)
- Verify the stylesheet loaded: look for a 200 response for the Devicon CSS URL in the Network tab. If you see a 404, correct the CDN link or local path.
- Confirm class names are spelled exactly as documented, noting they are case‑sensitive (e.g.,
devicon-python-plain, notDevicon-Python-Plain). - Clear the browser cache and reload; a stale CSS version can cause missing glyphs.
- If your site’s base CSS resets
font-familyor overrides pseudo‑elements, add a rule to preserve the Devicon font for the icon elements:.devicon { font-family: "Devicon" !important; } - Remember that the plain‑variant classes (
*-plain) rely on the font‑based icons. If you need SVG icons, use thedevicon-svgpackage or inline SVG instead of the CSS font approach.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.