All tutorials

Build and Host a Static Portfolio with HTML & CSS

Code a responsive one-page portfolio from scratch and publish it via SFTP or Git in under an hour.

Hostn.ME Team 9 min read 16 viewsUpdated November 22, 2026

Static sites are fast, secure and cheap to host. Let's build a responsive portfolio.

1. Project structure

portfolio/
├── index.html
├── styles.css
└── images/

2. The HTML

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Jane Doe — Designer</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <header class="hero">
    <h1>Hi, I'm Jane.</h1>
    <p>I design calm, useful interfaces.</p>
    <a class="btn" href="#work">See my work</a>
  </header>
  <section id="work" class="grid">
    <article><img src="images/p1.webp" alt="Banking app redesign"><h3>Banking App</h3></article>
    <article><img src="images/p2.webp" alt="Travel site"><h3>Travel Site</h3></article>
  </section>
</body>
</html>

3. The CSS

:root { --accent: #7c3aed; }
body { margin: 0; font-family: system-ui, sans-serif; color: #111; }
.hero { min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 2rem; }
.btn { background: var(--accent); color: #fff; padding: .8rem 1.4rem; border-radius: .6rem; text-decoration: none; }
.grid { display: grid; gap: 1.5rem; padding: 2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid img { width: 100%; border-radius: .8rem; aspect-ratio: 4/3; object-fit: cover; }

4. Publish it

Option A – SFTP: connect with FileZilla using your hosting SFTP credentials and upload the folder contents into public_html.

Option B – Git: create a static app in App Hosting, connect your repository, and every push publishes automatically.

5. Polish

  • Add a favicon.ico and Open Graph image
  • Compress images to WebP
  • Add a contact link: <a href="mailto:[email protected]">

Stuck on a step?

Our AI assistant knows every tutorial, and a real engineer is one click away.