Html codes
184 subscribers
111 photos
15 videos
226 files
197 links
👋 Welcome to Html Codee
🚀 Here you’ll find mini tools, code snippets, and web tricks to grow fast.
🧩 Built with HTML, PHP, and smart ideas.
💌 Support: support@bestpage.x10.mx
🏁 If you don't walk today, run tomorrow.
Download Telegram
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Alert Box</title>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #081021;
font-family: Arial, sans-serif;
}

.alert-btn {
padding: 12px 24px;
background: #ff9a9e;
border: none;
border-radius: 6px;
color: #fff;
font-size: 18px;
cursor: pointer;
transition: transform 0.2s;
}
.alert-btn:hover {
transform: scale(1.05);
}

.alert {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%) translateY(-50px);
background: #fad0c4;
color: #081021;
padding: 16px 24px;
border-radius: 8px;
font-weight: bold;
opacity: 0;
pointer-events: none;
transition: opacity 0.5s ease, transform 0.5s ease;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.alert.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
pointer-events: auto;
}
</style>
</head>
<body>

<button class="alert-btn">Show Alert</button>
<div class="alert" id="alertBox">This is a CSS Alert!</div>

<script>
const btn = document.querySelector('.alert-btn');
const alertBox = document.getElementById('alertBox');

btn.addEventListener('click', () => {
alertBox.classList.add('show');
setTimeout(() => {
alertBox.classList.remove('show');
}, 3000);
});
</script>

</body>
</html>
CodePen Blog
405: Elasticsearch → Postgres Search

Alex & Chris get into a fairly recent technological change at CodePen where we ditched our Elasticsearch implementation for just using our own Postgres database for search. Sometimes choices like this are more about team expertise, dev environment practicalities, and complexity tradeoffs. We found this change to be much better for us, which matters! For the most part search is better and faster. Postgres is not nearly as fancy and capable as Elasticsearch, but we werent taking advantage of what Elasticsearch had to offer anyway.

For the power users out there: it’s true that we’ve lost the ability to do in-code search for now. But it’s temporary and will be coming back in time.

Time Jumps
* 00:07 Alex is back!
* 01:10 The history of search at CodePen
* 02:15 Why was Elasticsearch not the right choice for CodePen?
* 09:36 Why we’re using PostGres instead
* 15:18 What does triggers have to do with search?
* 21:02 Figuring out what people are actually searching for
* 24:19 Some of the tradeoffs in changing search
Html codes
Photo
CodePen Blog
Chris’ Corner: Pretty Palettes

I’m not terribly good at picking a good color palette out of thin air. My go-to is a dark look with bright colored accents, but I’m wildly envious whenever I see a beautiful website with great looking colors that are very far away from what I could pull off.

Sometimes, a little inspiration can go a long way. Here’s some!

Color Lisa

Color Lisa is a curated list of color palettes based on masterpieces of the worlds greatest artists. Each palette was painstakingly created by color obsessed designers, artists, museum curators, and masters of color theory.
https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-12.53.19-PM-1024x915.png
Flexoki

Flexoki is minimalistic and high-contrast. The colors are calibrated for legibility and perceptual balance across devices and when switching between light and dark modes.
https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-12.55.07-PM-1024x559.png
Mildliner Reference

A guide to all the Mildliner colors and sets.
https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-12.56.15-PM-1024x480.png
Kind of Rebeccapurple

The story of how the new CSS logo came together, including a journey through lots of colors, only to land on definitely the right choice.

https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-1.04.34-PM.png

Hued

Match today’s color in three guesses.

https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-1.06.09-PM.png

Gradient Generator

Offers fairly advanced settings for a tool like this, including easing and interpolation modes.
https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-22-at-1.07.51-PM-1024x540.png
CodePen Blog
406: Hot Trends of 2025

Marie and Chris jump on to discuss some of the trends of what people are building on CodePen here, approximately halfway through 2025.

New CSS!

* Custom @functions (just landed)
* if() function
* clip-path & shape()
* corner-shape and the superellipse
* Scrolling stuff
* The attr() power up

Hot Styles

* Liquid glass (Jhey’s demo, Spark)
* Hard glitch (CRT-like effect with VFX-JS, Glitchy button hover effect with VFX-JS, ❍ Cinematic Glitch Slideshow)
* Holographics (CSS Holographic Masks)
* Grainy textures (Grainy distorted interactive 1 gradient blobs)
* Innovative blurs (wavy wobbly lava orb, Bubbles Background Animation)
* New color spaces (OKLCH Swatch Example, CSS Color Functions, CSS oklch Gradation)

Hot Pens

* Petr Knoll’s Glass Button (From February, well ahead of liquid glass)
* Mike Bespalov’s Monospace ASCII art generator (known to be “vibe coded”)
* Adam Kuhn’s Severance Lumon Macrodata Refinement
* Steve Gardner’s “Who Needs Shaders”
Collection of Pens Discussed in CodePen Radio 406
Time Jumps
* 00:06 406
* 00:31 Circling back to Marie
* 03:00 CSS is so cool right now
* 08:20 Clip path shapes
* 17:22 Liquid Glass is trending now
* 21:28 Glitching and datamoshing styles
* 24:48 Classic holographic textures
* 26:26 Grainy textures
* 30:03 AI is affecting trends on CodePen
* 37:53 4 hot pens from this year so far
Html codes
Photo
CodePen Blog
Chris’ Corner: Clever Clever

David Darnes made a <code-penweb component, which is a basic HTML/CSS/JS panel layout that renders them into an iframe (using the very cool <syntax-highlightweb component as well).

Then it ate itself when Ariel Salminen put a <code-penin a <code-pen.

Then the universe collapsed upon itself when Rob Rhoades made a code pen linking to a code pen inside a <code-peninside a CodePen.
https://blog.codepen.io/wp-content/uploads/2025/08/bafkreiapfnkwlb47qkeegkjzvdguclzzfuvk6ubck527d6bxiaz4hdbjj4.jpg The kids are alright.
Speaking of, uhhhh, eating oneself, Julia Miocene has a video of a Recursive square that is a very satisfying watch. I almost forgot what was happening up until the end when you’re like ohhhhhhhh right it’s a perfect loop. Clever clever.

There is a thing you need to do once in a while where the more text you have, the smaller you want the font-size to be (and vice-versa). I remember doing this ages ago on a quotes site where I wanted very short quotes in big text and very long quotes in small text. I counted the letters in PHP and applied a font size based on ranges. It wasn’t pretty. Dave blogged that (as long as you have the character count as an HTML attribute) you can do this in CSS (in supporting browsers). You set an “ideal” number of characters per line, then do a little division to get a ratio, and apply the ratio to the font-size (while setting a clamp-ed minimum and maximum). Clever clever.
https://blog.codepen.io/wp-content/uploads/2025/08/Screenshot-2025-08-28-at-7.51.10-AM-1024x588.png
I liked the Zach’s clever thinking in his Eleventy Image project where, when display an image that starts as SVG, it converts them to a raster format (like PNG or JPG) only when the converted image is actually smaller. Like it’s smart enough to pick which choice to make depending on file size. Or maybe I just like the name: SVG Short Circuiting.

Cassidy blogged a little while back a fairly succinct way of figuring out an element’s “index” when you need it. That is, say a

contains three elements, and you click the second one. How do you know it’s the second one? Go up the parent, get an array of the children, and check the indexOf of the button. (Clever, clever.) I actually think it’s more interesting that we’ll have this information in CSS soon with sibling-index() and friend (sibling-count()).
The pseudonymous dade blogged an idea that I’m pretty surprised I’d never seen before now, as it feels like an old school progressive enhancement technique. If you need to hide a feature on the page that you know only works with JavaScript, you can put a
Clever, clever.
CodePen Blog
407: Our Own CDN

Robert and Chris jump on to talk about own own little CDN project. Maybe that’s not the right term, but we struggled with naming it. Truth be told, it’s the /public/ folder in our monorepo, where the purpose is getting files to the world wide internet at URLs that anyone can access. Our favicon is a good example, where many of our sites need access to that, but we only want it once in our repo (but we have actually lots of use-cases.)

There are several complications along the way. One is that we need to fingerprint these files so we can cache-bust them when needed. We also need to be able to import the URLs in other parts of the repo, so we need manifest files that contain those URLs in multiple formats. Plus many of the files have their own build process, they aren’t just entirely static files. In the end, building our own thing was probably the right move.

The files go to Cloudflare R2, which, I suppose, is the CDN part.

Time Jumps
* 00:40 Introducing Robert
* 01:02 Our public CDN
* 04:25 How we might make the first version of this
* 09:58 How we link to fonts on the web
* 14:01 What is the correct way to implement this?
* 17:19 Accounting for different dev environments
* 22:29 How do we run deployment?
* 31:06 Why did we make our own build tool?
* 40:27 Taking in environment variables
Basic Computer Devices:

1.System Unit
2.Monitor
3.Keyboard
4.Mouse
5.Printer
6.Scanner

Additional Computer Devices:

1.Speakers
2.Headphones
3.Webcam
4.External Hard Drive
5.USB Flash Drive
6.Microphone

Follow us @Html_codee
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glitch Text Effect</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #111;
margin: 0;
}
.glitch {
font-size: 60px;
font-weight: bold;
color: #fff;
position: relative;
text-transform: uppercase;
}
.glitch::before,
.glitch::after {
content: attr(data-text);
position: absolute;
left: 0;
top: 0;
width: 100%;
overflow: hidden;
clip: rect(0, 0, 0, 0);
}
.glitch::before {
left: 2px;
text-shadow: -2px 0 red;
animation: glitch 2s infinite linear alternate-reverse;
}
.glitch::after {
left: -2px;
text-shadow: -2px 0 cyan;
animation: glitch 2s infinite linear alternate-reverse;
}

@keyframes glitch {
0% { clip: rect(10px, 9999px, 50px, 0); }
20% { clip: rect(60px, 9999px, 90px, 0); }
40% { clip: rect(20px, 9999px, 70px, 0); }
60% { clip: rect(40px, 9999px, 100px, 0); }
80% { clip: rect(30px, 9999px, 80px, 0); }
100% { clip: rect(50px, 9999px, 120px, 0); }
}
</style>
</head>
<body>
<h1 class="glitch" data-text="Glitch Effect">Glitch Effect</h1>
</body>
</html>