Blog / tutorials
How to Build Your First Website from Scratch with HTML and CSS
, 7 min read
What You Need
A text editor (VS Code, free), a web browser (Chrome or Firefox), and 2-3 hours. That's it. No frameworks, no npm, no build tools. Pure HTML and CSS is how every web developer starts, and it's still the foundation of everything.
HTML: The Structure
HTML defines what's on your page. Headings, paragraphs, images, links, and lists. Create an index.html file, add the basic HTML structure, then start adding content. Think of HTML as the skeleton of your website.
CSS: The Style
CSS defines how things look. Colors, fonts, spacing, and layout. Create a style.css file and link it to your HTML. Start with body font and background color, then style individual elements. Think of CSS as the clothing on your skeleton.
Build a Personal Page
Your first website should be a personal page: your name, a short bio, your interests, links to your social profiles, and maybe a photo. Keep it simple. A clean, minimal personal page is more impressive than a messy, overambitious one.
Make It Responsive
Add the viewport meta tag. Use percentages instead of fixed pixel widths. Use flexbox for layout. Test on your phone. A responsive first website shows you understand modern web development fundamentals from day one.
Put It Online
Use GitHub Pages to host your site for free. Push your code to a GitHub repository, enable GitHub Pages in settings, and your site is live with a URL you can share. You just deployed your first website. Celebrate that.