Liveweave: Generative AI Web Editor & HTML/CSS/JS Playground
Initializing
Liveweave
Web
expand_more
home
Home
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
frame_source
Python Playground
arrow_outward
build
Tools
expand_more
restart_alt
Load "Hello Weaver!"
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Fork
account_circle
Login
settings
Settings
expand_more
Editor font
14
px
A
A
Night mode
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
left_panel_close
AI Assistant
dashboard
All
HTML
CSS
JS
visibility
Preview
bolt
Live Preview
terminal
JS Console
<!DOCTYPE html> <html> <head> <title>News website template</title> </head> <body> <!-- Start your code here --> <div class="news-site"> <div class="topbar"> <div class="container top-inner"> <span>Wednesday, October 14, 2026</span> <div> <a href="#">About</a> <a href="#">Contact</a> <a href="#">Advertise</a> </div> </div> </div> <header class="main-header"> <div class="container header-inner"> <a href="#" class="logo"> News<span>Hub</span> <small>THE WORLD CLOSER</small> </a> <nav class="navigation"> <a href="#" class="active">Home</a> <a href="#world">World</a> <a href="#business">Business</a> <a href="#technology">Technology</a> <a href="#health">Health</a> <a href="#lifestyle">Lifestyle</a> <a href="#sports">Sports</a> </nav> <a href="#newsletter" class="subscribe-btn">Subscribe</a> </div> </header> <main class="container"> <div class="breaking-bar"> <strong>BREAKING NEWS</strong> <span>Stay informed with the latest stories from around the world.</span> <span class="breaking-arrow">→</span> </div> <div class="main-layout"> <div class="main-column"> <section class="hero-grid" id="world"> <a href="#latest" class="story hero-story"> <img src="https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1200&auto=format&fit=crop" alt="Mountain landscape"> <div class="story-overlay"> <span class="category">WORLD</span> <h1>Exploring the Future of Our Changing Planet</h1> <p>New perspectives on the environment, sustainability, and the decisions shaping tomorrow.</p> <div class="story-meta">By Alex Morgan | Editorial Feature</div> </div> </a> <div class="side-stories"> <a href="#latest" class="story side-story" id="business"> <img src="https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=800&auto=format&fit=crop" alt="Modern skyscrapers"> <div class="story-overlay"> <span class="category">BUSINESS</span> <h2>The New Forces Reshaping Global Business</h2> </div> </a> <a href="#latest" class="story side-story" id="technology"> <img src="https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=800&auto=format&fit=crop" alt="Technology workspace"> <div class="story-overlay"> <span class="category">TECHNOLOGY</span> <h2>How Technology Is Transforming Everyday Life</h2> </div> </a> </div> </section> <section class="latest-section" id="latest"> <div class="section-heading"> <h2>Latest News</h2> <a href="#latest">View All News →</a> </div> <div class="news-grid"> <article class="news-card"> <div class="image-wrap"> <img src="https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=700&auto=format&fit=crop" alt="Busy city"> <span class="category">BUSINESS</span> </div> <h3>How Cities Are Adapting to a Rapidly Changing World</h3> <p>Urban innovation and new approaches to growth are changing the places we live.</p> <small>FEATURE STORY</small> </article> <article class="news-card" id="health"> <div class="image-wrap"> <img src="https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?w=700&auto=format&fit=crop" alt="Medical professional"> <span class="category">HEALTH</span> </div> <h3>Medical Innovation Opens New Possibilities</h3> <p>Researchers continue to explore promising approaches to better healthcare.</p> <small>HEALTH & SCIENCE</small> </article> <article class="news-card" id="sports"> <div class="image-wrap"> <img src="https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=700&auto=format&fit=crop" alt="Soccer game"> <span class="category">SPORTS</span> </div> <h3>The Passion and Energy Behind Modern Sports</h3> <p>From rising stars to global competitions, sports continue to bring people together.</p> <small>SPORTS FEATURE</small> </article> <article class="news-card" id="lifestyle"> <div class="image-wrap"> <img src="https://images.unsplash.com/photo-1500534623283-312aade485b7?w=700&auto=format&fit=crop" alt="Scenic landscape"> <span class="category">LIFESTYLE</span> </div> <h3>Beautiful Destinations Worth Discovering</h3> <p>Discover inspiring places and unforgettable experiences around the world.</p> <small>TRAVEL & CULTURE</small> </article> </div> </section> </div> <aside class="sidebar"> <section class="trending"> <h2>Trending Now</h2> <div class="trend-item"> <span>01</span> <h3>The Next Chapter in Space Exploration</h3> </div> <div class="trend-item"> <span>02</span> <h3>Five Everyday Habits for a Healthier Life</h3> </div> <div class="trend-item"> <span>03</span> <h3>How Innovation Is Changing the Global Economy</h3> </div> <div class="trend-item"> <span>04</span> <h3>Artificial Intelligence and the Future of Work</h3> </div> <div class="trend-item"> <span>05</span> <h3>Extraordinary Places to Visit Around the World</h3> </div> </section> <section class="newsletter" id="newsletter"> <div class="mail-icon">✉</div> <h2>Get the Latest News</h2> <p>Thoughtful stories and fresh perspectives delivered to your inbox.</p> <form> <input type="email" placeholder="Your email address" required> <button type="button">Subscribe</button> </form> </section> <section class="follow-section"> <h2>Follow Us</h2> <div class="social-links"> <a href="#">f</a> <a href="#">X</a> <a href="#">in</a> <a href="#">YT</a> </div> </section> </aside> </div> </main> <footer class="footer"> <div class="container footer-inner"> <strong>News<span>Hub</span></strong> <p>A modern editorial experience. Demo content for Liveweave.</p> <span>© 2026 NewsHub</span> </div> </footer> </div> <!-- End your code here --> </body> </html>
* { box-sizing: border-box; } html { scroll-behavior: smooth; } body { margin: 0; background: #ffffff; color: #151515; font-family: Arial, Helvetica, sans-serif; } a { color: inherit; text-decoration: none; } .container { max-width: 1440px; margin: auto; padding: 0 35px; } .topbar { border-bottom: 1px solid #eeeeee; background: #fafafa; } .top-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #555; } .top-inner div { display: flex; gap: 25px; } .main-header { background: white; border-bottom: 1px solid #eee; } .header-inner { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 25px; } .logo { font-size: 43px; font-weight: 900; letter-spacing: -3px; line-height: 1; white-space: nowrap; } .logo span, .footer strong span { color: #ed171b; } .logo small { display: block; font-size: 9px; letter-spacing: 5px; color: #777; margin-top: 9px; font-weight: 600; } .navigation { display: flex; align-items: center; gap: 26px; } .navigation a { font-size: 14px; font-weight: bold; padding: 10px 0; border-bottom: 3px solid transparent; } .navigation a:hover, .navigation .active { color: #ed171b; border-bottom-color: #ed171b; } .subscribe-btn { background: #ed171b; color: white; border-radius: 7px; padding: 16px 24px; font-size: 13px; font-weight: bold; white-space: nowrap; } .breaking-bar { display: flex; align-items: center; gap: 22px; background: #f3f3f5; border-radius: 6px; margin: 22px 0; min-height: 47px; overflow: hidden; font-size: 13px; } .breaking-bar strong { background: #ed171b; color: white; padding: 16px 22px; white-space: nowrap; font-size: 12px; } .breaking-arrow { margin-left: auto; padding-right: 20px; font-size: 20px; } .main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 30px; } .main-column { min-width: 0; } .hero-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 15px; height: 430px; } .story { position: relative; display: block; overflow: hidden; border-radius: 9px; background: #ddd; } .story img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; } .story:hover img { transform: scale(1.05); } .story:after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(0,0,0,0.85)); } .story-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; color: white; z-index: 2; } .category { display: inline-block; background: #ed171b; color: white; padding: 7px 14px; border-radius: 25px; font-size: 10px; font-weight: bold; letter-spacing: 0.5px; } .hero-story h1 { font-family: Georgia, serif; font-size: clamp(28px, 3vw, 43px); line-height: 1.1; margin: 14px 0; } .hero-story p { font-size: 13px; line-height: 1.6; max-width: 480px; } .story-meta { font-size: 11px; margin-top: 18px; } .side-stories { display: grid; grid-template-rows: 1fr 1fr; gap: 15px; min-height: 0; } .side-story .story-overlay { padding: 20px; } .side-story h2 { font-family: Georgia, serif; font-size: 22px; line-height: 1.15; margin: 12px 0 0; } .sidebar h2 { font-size: 21px; margin: 5px 0 18px; } .trending h2, .follow-section h2 { border-left: 5px solid #ed171b; padding-left: 15px; } .trend-item { display: flex; gap: 17px; padding: 17px 0; border-bottom: 1px solid #e5e5e5; } .trend-item span { color: #ed171b; font-size: 28px; font-family: Georgia, serif; } .trend-item h3 { font-family: Georgia, serif; font-size: 15px; font-weight: normal; line-height: 1.4; margin: 0; } .latest-section { padding: 35px 0 60px; } .section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; } .section-heading h2 { border-left: 5px solid #ed171b; padding-left: 15px; font-size: 23px; margin: 0; } .section-heading a { color: #ed171b; font-size: 13px; } .news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; } .news-card { min-width: 0; } .image-wrap { position: relative; height: 140px; overflow: hidden; border-radius: 7px; } .image-wrap img { width: 100%; height: 100%; object-fit: cover; } .image-wrap .category { position: absolute; bottom: 10px; left: 10px; } .news-card h3 { font-family: Georgia, serif; font-size: 17px; line-height: 1.3; margin: 12px 0 8px; } .news-card p { color: #777; font-size: 12px; line-height: 1.6; } .news-card small { color: #999; font-size: 10px; } .newsletter { margin-top: 40px; padding: 24px; background: #fff1f2; border-radius: 10px; } .mail-icon { color: #ed171b; font-size: 28px; } .newsletter h2 { font-family: Georgia, serif; font-size: 22px; margin: 10px 0; } .newsletter p { font-size: 12px; line-height: 1.7; color: #555; } .newsletter form { display: flex; flex-direction: column; gap: 10px; } .newsletter input { width: 100%; padding: 14px; border: 1px solid #eee; border-radius: 6px; outline: none; } .newsletter button { border: 0; background: #ed171b; color: white; padding: 14px; border-radius: 6px; cursor: pointer; font-weight: bold; } .follow-section { margin-top: 35px; } .social-links { display: flex; gap: 10px; } .social-links a { width: 42px; height: 42px; border-radius: 50%; background: #f3f3f3; display: grid; place-items: center; font-weight: bold; font-size: 13px; } .social-links a:hover { background: #ed171b; color: white; } .footer { background: #f7f7f7; border-top: 1px solid #eee; padding: 35px 0; } .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; } .footer strong { font-size: 24px; letter-spacing: -1px; } .footer p, .footer-inner > span { font-size: 12px; color: #777; } @media (max-width: 1150px) { .navigation { gap: 13px; } .navigation a { font-size: 12px; } .main-layout { grid-template-columns: minmax(0, 1fr) 240px; } .news-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 850px) { .header-inner { flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; } .navigation { order: 3; width: 100%; overflow-x: auto; padding-bottom: 5px; } .main-layout { grid-template-columns: 1fr; } .hero-grid { height: auto; grid-template-columns: 1fr; } .hero-story { height: 420px; } .side-stories { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .side-story { height: 240px; } .sidebar { padding-bottom: 40px; } } @media (max-width: 550px) { .container { padding: 0 18px; } .top-inner div { display: none; } .logo { font-size: 36px; } .subscribe-btn { padding: 12px; } .breaking-bar { gap: 10px; } .breaking-bar strong { padding: 14px 10px; font-size: 10px; } .breaking-arrow { display: none; } .hero-story { height: 400px; } .story-overlay { padding: 20px; } .hero-story h1 { font-size: 29px; } .side-stories { grid-template-columns: 1fr; } .news-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .image-wrap { height: 110px; } .news-card h3 { font-size: 15px; } .footer-inner { flex-direction: column; align-items: flex-start; } }
// Write JavaScript here
terminal
JavaScript Console
Preview
Clear
close
›
Run