Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- Place the following CSS in your <head> or stylesheet --> <style> /* This is an optional body style to provide a background for the page */ body { background-color: #f9fafb; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; } /* Container for the list */ .list-view-container { max-width: 800px; margin: 2rem auto; padding: 0 1rem; display: grid; gap: 1.5rem; } /* === Horizontal Blog Card Styles === */ .h-blog-card { --h-blog-radius: 12px; --h-blog-shadow: 0 4px 10px rgba(0,0,0,0.06); background-color: #ffffff; border-radius: var(--h-blog-radius); box-shadow: var(--h-blog-shadow); display: flex; overflow: hidden; transition: box-shadow 0.2s ease; } .h-blog-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); } .h-blog-card-link { display: flex; width: 100%; color: inherit; text-decoration: none; } .h-blog-card-link:hover .h-blog-card-title { color: #4f46e5; } .h-blog-card-thumbnail { width: 150px; object-fit: cover; flex-shrink: 0; } .h-blog-card-content { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; flex-grow: 1; } .h-blog-card-category { font-size: 0.8rem; font-weight: 500; text-transform: uppercase; color: #4f46e5; margin-bottom: 0.5rem; } .h-blog-card-title { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0 0 0.5rem; transition: color 0.2s ease; /* Optional: Clamp title to 2 lines */ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } .h-blog-card-excerpt { font-size: 0.95rem; line-height: 1.6; color: #6b7280; margin: 0; /* Optional: Clamp excerpt to 2 lines */ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* Footer with author byline */ .h-blog-card-footer { margin-top: auto; /* Pushes to the bottom */ padding-top: 1rem; font-size: 0.875rem; color: #6b7280; } .h-blog-card-author { font-weight: 500; color: #374151; } @media (max-width: 500px) { .h-blog-card-link { flex-direction: column; } .h-blog-card-thumbnail { width: 100%; height: 150px; } } </style> <!-- Place the following HTML in your <body> --> <div class="list-view-container"> <!-- Card 1 --> <article class="h-blog-card"> <a href="#" class="h-blog-card-link"> <!-- Image by placehold.co. Replace with your own. --> <img class="h-blog-card-thumbnail" src="https://placehold.co/300x300/4ade80/ffffff/png?text=UX" alt="Abstract shapes representing UX concepts."> <div class="h-blog-card-content"> <div class="h-blog-card-category">UX Design</div> <h3 class="h-blog-card-title">Cognitive Load in UI Design</h3> <p class="h-blog-card-excerpt">How to reduce complexity and design more intuitive interfaces by understanding the limits of human cognition. </p> <footer class="h-blog-card-footer"> By <span class="h-blog-card-author">Elara Vance</span> • <time datetime="2025-11-10">Nov 10, 2025</time> </footer> </div> </a> </article> <!-- Card 2 --> <article class="h-blog-card"> <a href="#" class="h-blog-card-link"> <!-- Image by placehold.co. Replace with your own. --> <img class="h-blog-card-thumbnail" src="https://placehold.co/300x300/fbbf24/ffffff/png?text=Backend" alt="Abstract shapes representing server-side code."> <div class="h-blog-card-content"> <div class="h-blog-card-category">Backend Engineering</div> <h3 class="h-blog-card-title">Choosing the Right Database for Your Project</h3> <p class="h-blog-card-excerpt">A comprehensive comparison of SQL, NoSQL, and NewSQL databases to help you make an informed decision for your next application.</p> <footer class="h-blog-card-footer"> By <span class="h-blog-card-author">Dr. Aris Thorne</span> • <time datetime="2025-11-08">Nov 8, 2025</time> </footer> </div> </a> </article> </div>