Code snippets
Code snippets are small bits and pieces of code that you can add to your website. I try to keep it as simple as possible, but you'll still need basic knowledge in the language(s) the snippet is written in to take full advantage of it. Let me know if you have any questions!
For more elaborate code, scripts, and generators, see code projects.
This stuff will always be free, and you can do virtually whatever you want with it as long as you don't restrict the freedoms of others. Read my license terms for more information. I take donations at Ko-fi as well if you have any spare change, but that's completely optional!
HTML/CSS
- 2-column info box
A 2-column container with space for an image (that automatically resizes) and text.
- Accessible hamburger menu
A pure CSS hamburger menu that can actually be focused on with the keyboard.
- Flexbox columns
A way to easily build column-based layouts.
- Grid image gallery
A simple and responsive way to display a gallery.
- JS-free tabs
Get tabbed content using CSS and no Javascript.
- Skip to content button
Make life easier for screen reader and keyboard users with one neat trick!
CSS
- Light/dark mode done fast
Respect user light/dark mode preferences with CSS and maintain your sanity.
- Pride flag stripe gradients
Make a pride flag (or any other stripes) without opening an image editor.
- Tape effect
Get a realistic looking piece of tape with a few lines of code.
- Multiple pages in one file
Use PHP superglobals to make a one-page website.
- Styleswitcher
A styleswitcher that doesn't force you to preload every stylesheet is possible!