Certainly! Below is a simple Reddit landing page using HTML and CSS. This is a static mockup for demonstration purposes (no backend or login functionality). You can copy and run this code as an index.html file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Reddit - Dive into anything</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
font-family: 'Roboto', Arial, sans-serif;
background: #dae0e6;
color: #1a1a1b;
}
.header {
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 24px;
box-shadow: 0 2px 4px rgba(0,0,0,0.03);
position: sticky;
top: 0;
z-index: 10;
}
.logo {
display: flex;
align-items: center;
font-weight: bold;
font-size: 1.5em;
color: #ff4500;
text-decoration: none;
}
.logo img {
height: 36px;
margin-right: 10px;
}
.search-bar {
flex: 1;
margin: 0 24px;
max-width: 500px;
}
.search-bar input {
width: 100%;
padding: 8px 12px;
border-radius: 20px;
border: 1px solid #ccc;
font-size: 1em;
outline: none;
}
.header-buttons {
display: flex;
gap: 12px;
}
.header-buttons button {
background: #ff4500;
color: #fff;
border: none;
border-radius: 20px;
padding: 8px 20px;
font-weight: bold;
cursor: pointer;
transition: background 0.2s;
}
.header-buttons button.secondary {
background: #fff;
color: #ff4500;
border: 1px solid #ff4500;
}
.main-content {
display: flex;
justify-content: center;
margin-top: 32px;
gap: 32px;
}
.feed {
background: #fff;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
width: 600px;
padding: 24px;
}
.post {
border-bottom: 1px solid #eee;
padding: 16px 0;
display: flex;
gap: 16px;
}
.post:last-child {
border-bottom: none;
}
.vote {
display: flex;
flex-direction: column;
align-items: center;
color: #878a8c;
font-size: 1.2em;
margin-right: 8px;
}
.vote button {
background: none;
border: none;
cursor: pointer;
color: #878a8c;
font-size: 1.2em;
transition: color 0.2s;
}
.vote button.upvote:hover {
color: #ff4500;
}
.vote button.downvote:hover {
color: #7193ff;
}
.post-content {
flex: 1;
}
.post-title {
font-weight: bold;
font-size: 1.1em;
margin-bottom: 4px;
color: #1a1a1b;
text-decoration: none;
}
.post-details {
font-size: 0.9em;
color: #878a8c;
margin-bottom: 6px;
}
.sidebar {
width: 300px;
background: #fff;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
padding: 24px;
height: fit-content;
}
.sidebar h2 {
font-size: 1.1em;
margin-top: 0;
color: #1a1a1b;
}
.sidebar ul {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar li {
margin-bottom: 12px;
}
.sidebar a {
color: #0079d3;
text-decoration: none;
font-weight: bold;
}
.sidebar a:hover {
text-decoration: underline;
}
@media (max-width: 900px) {
.main-content {
flex-direction: column;
align-items: center;
}
.sidebar {
width: 90vw;
margin-top: 24px;
}
.feed {
width: 90vw;
}
}
</style>
</head>
<body>
<div class="header">
<a href="#" class="logo">
<img src="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-180x180.png" alt="Reddit Logo">
Reddit
</a>
<div class="search-bar">
<input type="text" placeholder="Search Reddit">
</div>
<div class="header-buttons">
<button>Log In</button>
<button class="secondary">Sign Up</button>
</div>
</div>
<div class="main-content">
<div class="feed">
<div class="post">
<div class="vote">
<button class="upvote">▲</button>
<div>12.3k</div>
<button class="downvote">▼</button>
</div>
<div class="post-content">
<a href="#" class="post-title">What’s your favorite productivity hack?</a>
<div class="post-details">r/AskReddit • Posted by u/exampleuser • 2 hours ago</div>
<div>Share your best tips for staying focused and getting things done!</div>
</div>
</div>
<div class="post">
<div class="vote">
<button class="upvote">▲</button>
<div>8.1k</div>
<button class="downvote">▼</button>
</div>
<div class="post-content">
<a href="#" class="post-title">Show off your pet photos!</a>
<div class="post-details">r/aww • Posted by u/cutecat • 1 hour ago</div>
<div>Let’s see those adorable pets!</div>
</div>
</div>
<div class="post">
<div class="vote">
<button class="upvote">▲</button>
<div>5.4k</div>
<button class="downvote">▼</button>
</div>
<div class="post-content">
<a href="#" class="post-title">ELI5: How do airplanes stay in the air?</a>
<div class="post-details">r/explainlikeimfive • Posted by u/curiousgeorge • 3 hours ago</div>
<div>Can someone explain the basics of flight in simple terms?</div>
</div>
</div>
</div>
<div class="sidebar">
<h2>Top Communities</h2>
<ul>
<li><a href="#">r/AskReddit</a></li>
<li><a href="#">r/funny</a></li>
<li><a href="#">r/gaming</a></li>
<li><a href="#">r/pics</a></li>
<li><a href="#">r/science</a></li>
</ul>
<hr>
<h2>About Reddit</h2>
<p>Reddit is a network of communities where people can dive into their interests, hobbies and passions.</p>
<a href="#" style="display:inline-block;margin-top:10px;background:#ff4500;color:#fff;padding:8px 16px;border-radius:20px;text-decoration:none;font-weight:bold;">Create Post</a>
</div>
</div>
</body>
</html>
Features:
- Responsive layout
- Header with logo, search bar, and login/signup buttons
- Main feed with sample posts and upvote/downvote buttons
- Sidebar with top communities and about section
Let me know if you want a more advanced version (with JavaScript, React, etc.) or specific features!