How to
Neocities

A 5-day guide from messy beginner to confident web maker. Click each day tab to progress at your own pace.

Day 0 Setting Up Your Site

Today's Goals

  • Create your Neocities account
  • Understand what files make a website
  • Make your first edit and see it live

Getting Started

  1. Go to neocities.org and create a free account
  2. Choose a site name (this will be yourname.neocities.org)
  3. You'll see a dashboard with your filesโ€”click on index.html to edit
  4. Make a small change and click Save
  5. Click View to see your site live!
Congratulations! You just published to the internet. That's genuinely all it takes.

Understanding Your Files

Every website is just files. Here's what you start with:

๐Ÿ“ yoursite.neocities.org/
  โ”œโ”€โ”€ index.html โ† Your homepage (this loads first)
  โ”œโ”€โ”€ style.css โ† Your styles (colors, fonts, layout)
  โ””โ”€โ”€ not_found.html โ† Shows when a page doesn't exist

Try It: Your First Edit

In your index.html, find the text between <h1> and </h1> tags. Change it to your name:

Live Preview

Hello World

Try typing in the box below:

Important: No Undo Button Neocities doesn't have undo. Before making big changes, select all your code (Cmd+A), copy it (Cmd+C), and paste it somewhere safe. This is your backup.
End of Day 0 You've created an account, edited a page, and seen it live on the internet. Tomorrow, we'll learn what HTML and CSS actually are.

Day 1 What is HTML & CSS?

Today's Goals

  • Understand HTML structure and tags
  • Learn CSS basics: selectors, properties, values
  • Link CSS to your HTML
  • Add images to your page

Essential HTML Structure

<!DOCTYPE html>
<html>
<head>
  <title>My Site</title>  <!-- Shows in browser tab -->
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Big Heading</h1>
  <p>A paragraph of text.</p>
</body>
</html>

HTML vs CSS: What's the Difference?

HTML = Structure

What things are
(headings, paragraphs, images)

CSS = Style

How things look
(colors, sizes, spacing)

Common HTML Tags

TagWhat It Does
<h1> to <h6>Headings (h1 biggest, h6 smallest)
<p>Paragraph of text
<a href="...">Link to another page
<img src="...">Display an image
<div>Generic container/box
<span>Inline container for text
<ul>, <ol>, <li>Lists (unordered, ordered, item)

CSS Basics

CSS Anatomy
selector {
  property: value;
}

h1 {           โ† selector (what to style)
  color: red;  โ† property: value;
  font-size: 2em;
}

Link your CSS file in the <head> of every HTML page:

<head>
  <title>My Site</title>
  <link rel="stylesheet" href="style.css">
</head>

Then in style.css:

body {
  font-family: Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 2em;
  background: #fff;
  color: #111;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

a {
  color: #111;
}

a:hover {
  color: #666;
}

Adding Images

  1. Create an images folder in Neocities
  2. Drag and drop image files into that folder
  3. Reference them in your HTML:
<!-- Basic image -->
<img src="images/photo.jpg" alt="Description of the image">

Image with Caption

Use <figure> and <figcaption> to add a caption to your image:

<figure>
  <img src="images/photo.jpg" alt="Description of image">
  <figcaption>Photo caption goes here</figcaption>
</figure>
Image vs Figure Preview
<img> alone
Caption with <figcaption>
No Spaces in File Names! my photo.jpg won't work online. Use my-photo.jpg instead.
Always Include Alt Text

The alt="" attribute describes the image for screen readers and shows if the image fails to load. Always include it!

End of Day 1 You understand HTML structure and CSS basics. Tomorrow, we'll build out your site with navigation, typography, color, and layout.

Day 2 Structure, Typography & Layout

Today's Goals

  • Create multiple pages and link them with navigation
  • Add headers and footers
  • Add custom fonts and typography
  • Learn color formats
  • Use Flexbox and Grid for responsive layouts

Creating New Files

In your Neocities dashboard:

  1. Click "New File"
  2. Type the full name with extension: about.html
  3. Click "Create"
  4. You now have a blank page to edit
  5. Your pages can be called anything you like but you cannot use spaces or special characters [other than hyphens - or underscores _]
Creating Folders Click "New Folder" to organize files. Put all images in an images/ folder.

Page Structure: Header, Main, Footer

A well-structured page has semantic sections:

<body>
  <header>
    <nav>
      <a href="index.html">Home</a>
      <a href="about.html">About</a>
      <a href="work.html">Work</a>
    </nav>
  </header>
  
  <main>
    <h1>Page Title</h1>
    <p>Your content here...</p>
  </main>
  
  <footer>
    <p>&copy; 2026 Your Name</p>
  </footer>
</body>
Page Structure Preview

Main Content

Your page content goes here...

ยฉ 2026 Your Name

Styling Navigation

nav {
  display: flex;
  gap: 1.5em;
  padding: 1em;
  background: #111;
}

nav a {
  color: #fff;
  text-decoration: none;
}

nav a:hover {
  color: #a6e;
}

Adding Custom Fonts

The easiest way to add fonts is with Google Fonts:

  1. Go to fonts.google.com
  2. Browse and select fonts you like (click the + button)
  3. Click "View selected families" and copy the <link> code
  4. Paste it in your <head> before your CSS link
<head>
  <!-- Google Font -->
  <link href="https://fonts.googleapis.com/css2?family=Space+Mono&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="style.css">
</head>

Then use it in your CSS:

body {
  font-family: 'Space Mono', monospace;
}

h1 {
  font-family: 'Playfair Display', serif;
}
Font Preview

Serif โ€” has little feet (Times, Georgia)

Sans-serif โ€” clean lines (Helvetica, Arial)

Monospace โ€” equal width (Courier, Monaco)

Typography Properties

h1 {
  font-size: 2.5em;        /* Size (em = relative to parent) */
  font-weight: 700;        /* Boldness: 100-900 */
  line-height: 1.2;        /* Space between lines */
  letter-spacing: 0.05em;  /* Space between letters */
  text-transform: uppercase; /* CAPS, lowercase, Capitalize */
}
Pro Typography Tips
  • Use 2-3 fonts max โ€” one for headings, one for body
  • Set line-height: 1.5 for readable body text
  • Use em or rem for sizes (scales better)

Color Formats

CSS supports several ways to write colors:

Color Formats
#a6e or #aa66ee
Hex (most common)
rgb(170, 102, 238)
RGB (red, green, blue)
rgba(170, 102, 238, 0.5)
RGBA (with transparency)
hsl(270, 80%, 67%)
HSL (hue, saturation, lightness)

Shadows & Gradients

/* Text shadow: x-offset y-offset blur color */
h1 {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Box shadow */
.card {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Gradients */
background: linear-gradient(to right, #a6e, #58f);
background: radial-gradient(circle, #fff, #a6e);

Layout with Flexbox

Flexbox is perfect for one-dimensional layouts (rows or columns):

.container {
  display: flex;
  gap: 1em;              /* Space between items */
  justify-content: center; /* Horizontal alignment */
  align-items: center;   /* Vertical alignment */
  flex-wrap: wrap;       /* Wrap to new line */
}
Flexbox Preview
Item 1
Item 2
Item 3

Layout with CSS Grid

Grid is perfect for two-dimensional layouts (rows AND columns):

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 1em;
}

/* Responsive: 2 columns on tablet, 1 on mobile */
@media (max-width: 800px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
Grid Preview
1
2
3
4
5
6
Responsive Design Tip

Use @media queries to change layouts at different screen sizes. Common breakpoints:

  • max-width: 500px โ€” Mobile phones
  • max-width: 800px โ€” Tablets
  • max-width: 1200px โ€” Small laptops

Your Site Structure by End of Day 2

๐Ÿ“ yoursite.neocities.org/
  โ”œโ”€โ”€ index.html โ† Homepage with header/nav/footer
  โ”œโ”€โ”€ about.html
  โ”œโ”€โ”€ work.html
  โ”œโ”€โ”€ style.css โ† Typography, colors, grid styles
  โ””โ”€โ”€ ๐Ÿ“ images/
      โ”œโ”€โ”€ photo1.jpg
      โ””โ”€โ”€ photo2.jpg
End of Day 2 You have a structured multi-page site with navigation, headers, footers, custom typography, colors, and responsive layouts. Tomorrow we add interactivity!

Day 3 Links, Buttons & Interactive Elements

Today's Goals

  • Style links and navigation states
  • Create clickable buttons
  • Add hover effects and transitions
  • Add icons and favicons
  • Apply CSS treatments to images (filters, borders, effects)
  • Create interactive elements with CSS
  • Preview: What is JavaScript?

Linking Cheatsheet

<!-- Same folder -->
<a href="about.html">About</a>

<!-- Inside a folder -->
<a href="pages/about.html">About</a>

<!-- Up one folder -->
<a href="../index.html">Home</a>

<!-- External link (opens in new tab) -->
<a href="https://example.com" target="_blank">External</a>

<!-- Email link -->
<a href="mailto:you@email.com">Email Me</a>

Styling Link States

Links have different states you can style:

a {
  color: #111;
  text-decoration: none;
}

a:hover {    /* Mouse over */
  color: #a6e;
}

a:active {   /* Being clicked */
  color: #58f;
}

a:visited {  /* Already visited */
  color: #666;
}

Styling Buttons

Make links and buttons look clickable:

.button {
  display: inline-block;
  padding: 0.8em 1.5em;
  background: #111;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  transition: all 0.2s ease;
}

.button:hover {
  background: #333;
  transform: translateY(-2px);
}

/* Outline style */
.button-outline {
  background: transparent;
  border: 2px solid #111;
  color: #111;
}

.button-outline:hover {
  background: #111;
  color: #fff;
}

In HTML, use it like this:

<a href="contact.html" class="button">Contact Me</a>
<button class="button">Submit</button>

Hover Effects & Transitions

Make elements respond when users hover:

/* Scale up on hover */
.card:hover {
  transform: scale(1.05);
}

/* Always add transition for smooth effects */
.card {
  transition: transform 0.2s ease;
}

/* Change multiple properties */
a {
  color: #111;
  transition: color 0.2s, transform 0.2s;
}
a:hover {
  color: #a6e;
  transform: translateX(5px);
}
Hover Effects Preview (try hovering!)
Scale Up
Float Up
Color Change
Add Shadow
Rotate
Invert
Transition = Smooth

Without transition, changes are instant and jarring. Always add transition: all 0.2s ease; for smooth effects.

Custom Cursors

Change the mouse cursor for interactive elements:

/* Common cursor values */
.clickable { cursor: pointer; }    /* Hand */
.draggable { cursor: grab; }       /* Grab hand */
.loading { cursor: wait; }         /* Spinner */
.disabled { cursor: not-allowed; } /* No symbol */

/* Custom cursor image */
body {
  cursor: url('my-cursor.png'), auto;
}
Cursor Preview (hover each)
pointer grab crosshair not-allowed help zoom-in

Adding Icons

Use emoji or icon libraries to add visual elements:

Option 1: Emoji

Just type or paste emoji directly in your HTML!

<a href="mailto:me@email.com">๐Ÿ“ง Email me</a>
<span>Made with โค๏ธ</span>
Option 2: Font Awesome (Icon Library)

Add this to your <head>:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">

Then use icons:

<i class="fa-brands fa-instagram"></i> Instagram
<i class="fa-solid fa-envelope"></i> Email
Icon Examples
๐Ÿ“ง Email    ๐Ÿ”— Link    โญ Star    ๐ŸŽจ Art    ๐Ÿ’ป Code    ๐ŸŒ™ Dark Mode

Creating a Favicon

The favicon is the small icon in the browser tab:

  1. Create a small square image (32ร—32 or 64ร—64 pixels)
  2. Save it as favicon.ico or favicon.png
  3. Upload to your site's root folder
  4. Add this to your <head>:
<link rel="icon" type="image/png" href="favicon.png">
Quick Favicon: Use an Emoji!
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>๐ŸŒŸ</text></svg>">

CSS-Only Interactive: Accordion

Create collapsible sections with just HTML & CSS:

<details>
  <summary>Click to expand</summary>
  <p>Hidden content goes here...</p>
</details>
Accordion Preview
Click to expand

This content was hidden until you clicked! No JavaScript needed.


CSS Image Treatments

Now that you know how to insert images (Day 1), CSS lets you style and treat them in creative ways:

img {
  max-width: 100%;        /* Responsive: never wider than container */
  height: auto;           /* Maintain aspect ratio */
}

/* Rounded corners */
.rounded { border-radius: 8px; }
.circle { border-radius: 50%; }

/* Borders & shadows */
.framed {
  border: 3px solid #111;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Filters */
.grayscale { filter: grayscale(100%); }
.blur { filter: blur(2px); }
.bright { filter: brightness(1.2); }
.sepia { filter: sepia(100%); }

/* Hover effect: color on hover */
.hover-color {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.hover-color:hover {
  filter: grayscale(0%);
}
Image Treatments Preview
Rounded
Circle
Framed
Grayscale
Sepia

Object-Fit for Image Containers

Control how images fill their containers:

.image-container {
  width: 200px;
  height: 200px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* Crop to fill (most common) */
  /* object-fit: contain; โ€” Fit inside, may have gaps */
  /* object-fit: fill;    โ€” Stretch to fill (may distort) */
  object-position: center; /* Where to anchor the crop */
}
Image Best Practices
  • Always include alt="" text for accessibility
  • Use max-width: 100% for responsive images
  • Optimize file sizes before uploading (use tools like TinyPNG)
  • Use object-fit: cover for consistent grid layouts

๐Ÿ”ฎ Preview: What is JavaScript?

Tomorrow we'll add JavaScript to make your site truly interactive. Here's a preview:

HTML = Content

What's on the page

CSS = Appearance

How it looks

JavaScript = Behavior

What it does (interactivity, animations, logic)

JavaScript lets you:

  • Respond to clicks and other user actions
  • Show/hide content dynamically
  • Create dark mode toggles
  • Make elements draggable
  • Animate elements beyond CSS
  • Load content without refreshing the page
Coming in Day 4 We'll cover selecting elements, responding to clicks, toggling classes, and making draggable elements!
End of Day 3 Your site now has styled links, buttons, hover effects, icons, image treatments, and interactive elements. Tomorrow we add JavaScript for even more dynamic interactions!

Day 4 JavaScript Basics

Today's Goals

  • Understand what JavaScript does
  • Add simple interactions
  • Make draggable elements
  • Toggle classes and states

What is JavaScript?

HTML = Content

What's on the page

CSS = Appearance

How it looks

JavaScript = Behavior

What it does (interactivity, animations, logic)

Adding JavaScript to Your Page

Add a <script> tag at the end of your <body>:

<body>
  <!-- Your HTML content -->
  
  <script>
    // Your JavaScript code here
    console.log('Hello from JavaScript!');
  </script>
</body>
Why at the bottom?

JavaScript runs immediately when loaded. Put it at the bottom so all your HTML elements exist first!

Selecting Elements

// Select one element by ID
const heading = document.getElementById('main-title');

// Select one element by CSS selector
const button = document.querySelector('.button');

// Select ALL matching elements
const cards = document.querySelectorAll('.card');

Responding to Clicks

<button id="myBtn">Click Me</button>

<script>
  document.getElementById('myBtn').addEventListener('click', function() {
    alert('Button clicked!');
  });
</script>
Click Demo

Toggle Classes (Show/Hide, Dark Mode, etc.)

<button id="toggleBtn">Toggle Dark Mode</button>

<script>
  document.getElementById('toggleBtn').addEventListener('click', function() {
    document.body.classList.toggle('dark-mode');
  });
</script>

Then in your CSS:

body.dark-mode {
  background: #111;
  color: #fff;
}

body.dark-mode a {
  color: #a6e;
}

Make Elements Draggable

<div class="draggable" style="position: absolute; left: 100px; top: 100px;">
  Drag me!
</div>

<script>
document.querySelectorAll('.draggable').forEach(el => {
  let isDragging = false;
  let offsetX, offsetY;
  
  el.addEventListener('mousedown', (e) => {
    isDragging = true;
    offsetX = e.clientX - el.offsetLeft;
    offsetY = e.clientY - el.offsetTop;
    el.style.cursor = 'grabbing';
  });
  
  document.addEventListener('mousemove', (e) => {
    if (!isDragging) return;
    el.style.left = (e.clientX - offsetX) + 'px';
    el.style.top = (e.clientY - offsetY) + 'px';
  });
  
  document.addEventListener('mouseup', () => {
    isDragging = false;
    el.style.cursor = 'grab';
  });
});
</script>
Draggable Demo (drag the boxes!)
Drag me!
Me too!
And me!
Mobile Touch Support

The code above works for mouse. For touch devices, you need touch events:

el.addEventListener('touchstart', (e) => { ... });
el.addEventListener('touchmove', (e) => { ... });
el.addEventListener('touchend', () => { ... });

Changing Content

// Change text
document.getElementById('title').textContent = 'New Title';

// Change HTML
document.getElementById('container').innerHTML = '<p>New content</p>';

// Change styles
document.getElementById('box').style.background = 'red';
document.getElementById('box').style.display = 'none';

Useful JavaScript Patterns

Fun Interactions to Try
  • Click to toggle class: el.classList.toggle('active')
  • Change on hover: Use mouseenter and mouseleave
  • Follow cursor: Update position on mousemove
  • Random colors: Math.random().toString(16).slice(2,8)
  • Typewriter effect: Add letters with setTimeout

External JavaScript File

For larger projects, put JavaScript in a separate file:

<!-- In your HTML -->
<script src="script.js"></script>

<!-- Then in script.js -->
document.addEventListener('DOMContentLoaded', function() {
  // Your code here - runs after page loads
});
End of Day 4 You can now add JavaScript interactions to your site! Tomorrow we set up local development for a professional workflow.

Day 5 Local Development

Today's Goals

  • Set up VS Code on your computer
  • Download your Neocities site
  • Work with Live Server (instant preview)
  • Understand the local โ†’ upload workflow

Why Work Locally?

Neocities Editor
  • No undo
  • Clunky file management
  • Can't work offline
  • Simple to start
VS Code + Local Files
  • Unlimited undo
  • Drag-and-drop files
  • Works offline
  • Live preview

Setting Up VS Code

  1. Download VS Code
    Go to code.visualstudio.com and install
  2. Install Live Server Extension
    Extensions icon (4 squares) โ†’ Search "Live Server" โ†’ Install
  3. Create a Site Folder
    On your computer, create a folder called my-neocities-site
  4. Open Folder in VS Code
    File โ†’ Open Folder โ†’ Select your folder
  5. Download Your Neocities Site
    Neocities Dashboard โ†’ Settings โ†’ "Download Entire Site" โ†’ Unzip into your folder
  6. Start Live Server
    Right-click index.html โ†’ "Open with Live Server"
Magic of Live Server Every time you save (Cmd+S), your browser automatically refreshes. No more clicking "View" constantly!

The Local Development Workflow

Workflow Diagram
1. Edit
In VS Code
โ†’
2. Save
Cmd+S
โ†’
3. Preview
Auto-refresh!
โ†’
4. Upload
When ready

Uploading Back to Neocities

When you're ready to publish your changes:

  1. Go to your Neocities dashboard
  2. Drag and drop your changed files onto Neocities
  3. Check your live site
Watch Your Paths If you use images/photo.jpg locally, make sure the folder structure is the same on Neocities.
End of Day 5 You're now working like a professional developer: edit locally, preview instantly, upload when ready.

Days 6-15 Independent Development

This Week's Goals

  • Build out your 5-page site independently
  • Organize your files professionally
  • Run through the launch checklist
  • Final upload and testing

You're Ready to Build Independently

You now have all the skills you need. These days are for building, experimenting, and polishing your site.

Workflow Reminder
  1. Edit locally in VS Code
  2. Preview with Live Server
  3. Upload to Neocities when ready

Professional File Structure

๐Ÿ“ my-neocities-site/
  โ”œโ”€โ”€ index.html
  โ”œโ”€โ”€ about.html
  โ”œโ”€โ”€ work.html
  โ”œโ”€โ”€ contact.html
  โ”œโ”€โ”€ blog.html
  โ”œโ”€โ”€ ๐Ÿ“ css/
  โ”‚   โ””โ”€โ”€ style.css
  โ”œโ”€โ”€ ๐Ÿ“ images/
  โ”‚   โ”œโ”€โ”€ hero.jpg
  โ”‚   โ””โ”€โ”€ profile.jpg
  โ”œโ”€โ”€ ๐Ÿ“ projects/ โ† For gallery/portfolio items
  โ”‚   โ”œโ”€โ”€ project1.html
  โ”‚   โ”œโ”€โ”€ project2.html
  โ”‚   โ””โ”€โ”€ project3.html
  โ””โ”€โ”€ ๐Ÿ“ _backups/ โ† Keep old versions here
      โ””โ”€โ”€ index-jan19.html
Walking Up Directories with ../

When your HTML is inside a folder (like projects/project1.html), you need to "walk back up" to find your CSS and images:

<!-- From projects/project1.html -->
<link rel="stylesheet" href="../css/style.css">
<img src="../images/hero.jpg">
<a href="../index.html">Back to Home</a>
  • ../ means "go up one folder"
  • ../../ means "go up two folders"
  • From projects/project1.html, use ../css/style.css to reach the css folder
When to Use Subfolders

Use a projects/ folder when you have:

  • A gallery page linking to individual project detail pages
  • Blog posts that each need their own page
  • Multiple related pages that belong together

Simple Backup Strategy

Before making big changes:

  1. Copy your file
  2. Rename it with the date: index-jan19.html
  3. Put it in your _backups folder
  4. Now you can safely experiment
Pro Tip The underscore in _backups makes it sort to the top of your folder. You can also add it to .gitignore if you use Git later.

Testing on Mobile

  1. In Chrome, press F12 or right-click โ†’ Inspect
  2. Click the phone/tablet icon (Toggle Device Toolbar)
  3. Select different device sizes from the dropdown
  4. Look for layout problems
Responsive Test Preview
Mobile
Tablet
Desktop

Common Problems & Solutions

Problem Solution
CSS not loading Check your <link> path. Try hard refresh: Cmd+Shift+R
Image not showing Check file path, extension, and that there are no spaces in filename
Link not working Check the file exists and the href path is correct
Works locally, not on Neocities Make sure you uploaded ALL files including folders

Pre-Launch Checklist

  • All 5 pages created and linked
  • Navigation works on every page
  • All images load correctly
  • Site looks good on mobile
  • No broken links
  • Spelling checked
  • Site title is set
  • Final backup saved

Check Your Navigation

Every page should have the same navigation:

<nav>
  <a href="index.html">Home</a>
  <a href="about.html">About</a>
  <a href="work.html">Work</a>
  <a href="blog.html">Blog</a>
  <a href="contact.html">Contact</a>
</nav>

Final Upload

  1. Save all files in VS Code
  2. Test everything with Live Server one more time
  3. Go to Neocities dashboard
  4. Drag and drop ALL your files (or use the Neocities VS Code extension)
  5. Visit your live site and test every page
  6. Test on your phone too
  7. Share your URL!
Your URL Your site is live at: https://YOURNAME.neocities.org

What You've Learned

Your New Skills
HTML Structure & content
CSS Styling & layout
Files Organization
Workflow Professional process
๐ŸŽ‰ Congratulations! You've built a complete multi-page website from scratch. You understand HTML, CSS, and professional workflows. This is a real skill you'll use forever.
What's Next? Check the Advanced tab for API automation, Git version control, and other hosting options. Check the Tips tab for quick reference shortcuts.

Quick Reference Tips & Tricks

Handy shortcuts and quick fixes you'll use all the time.

Keyboard Shortcuts

Action Mac Windows
SaveCmd+SCtrl+S
UndoCmd+ZCtrl+Z
RedoCmd+Shift+ZCtrl+Y
Select AllCmd+ACtrl+A
CopyCmd+CCtrl+C
PasteCmd+VCtrl+V
Hard Refresh (clear cache)Cmd+Shift+RCtrl+Shift+R
Open DevToolsCmd+Option+IF12

Essential HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Page Title</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- Your content here -->
</body>
</html>

Linking Cheatsheet

<!-- Same folder -->
<a href="about.html">About</a>

<!-- Inside a folder -->
<a href="pages/about.html">About</a>

<!-- Up one folder -->
<a href="../index.html">Home</a>

<!-- External link (opens in new tab) -->
<a href="https://example.com" target="_blank">External</a>

Image Syntax

<!-- Basic image -->
<img src="images/photo.jpg" alt="Description">

<!-- With figure and caption -->
<figure>
  <img src="images/photo.jpg" alt="Description">
  <figcaption>Caption text</figcaption>
</figure>

Quick Fixes

CSS Not Working?
  1. Check <link> is in <head>
  2. Check the file path is correct
  3. Hard refresh: Cmd+Shift+R
  4. Check for typos in CSS selectors
Image Not Showing?
  1. Check the file path in src=""
  2. Check the file extension (.jpg vs .jpeg vs .png)
  3. No spaces in filename!
  4. Case matters: Photo.jpg โ‰  photo.jpg

Common CSS Properties

/* Text */
color: #111;
font-size: 16px;
font-family: Helvetica, sans-serif;
text-align: center;

/* Spacing */
margin: 20px;          /* Outside */
padding: 20px;         /* Inside */

/* Box */
background: #f0f0f0;
border: 1px solid #ccc;
border-radius: 4px;

/* Layout */
display: flex;
justify-content: center;
align-items: center;
gap: 10px;

Optional Advanced Techniques

For Later This section covers advanced topics. Master Days 0โ€“5 first, then explore these when you're ready.

Neocities VS Code Extension

Upload directly from VS Code without visiting the website:

  1. In VS Code, go to Extensions
  2. Search "Neocities" and install the extension
  3. Open Command Palette: Cmd+Shift+P
  4. Type "Neocities" to see upload options
  5. Enter your credentials when prompted

Mount Neocities as a Drive (WebDAV)

Access your Neocities files like a folder on your computer:

Mac
1. In Finder, press Cmd+K
2. Enter: https://neocities.org/webdav/
3. Login with your Neocities credentials
4. Your site appears as a folder
Windows
1. File Explorer โ†’ Right-click "This PC" โ†’ "Map Network Drive"
2. Click "Connect to a Web site..."
3. Enter: https://neocities.org/webdav/
4. Login and your site becomes a network folder

Neocities Command Line Interface

For power users: upload with a single command:

# Install the Neocities CLI (requires Ruby)
$ gem install neocities

# Push your entire folder to Neocities
$ neocities push .

# First time will ask for credentials
One Command Deploy Once set up, updating your site is just neocities push . from your project folder.

Neocities API

Automate uploads with the Neocities API:

# Get your API key
$ curl -u "YOUR_USERNAME:YOUR_PASSWORD" "https://neocities.org/api/key"

# Upload a file
$ curl -u "USER:PASS" -F "index.html=@index.html" https://neocities.org/api/upload

Other Hosting Options

The workflow you've learned works everywhere:

Host Best For How to Deploy
GitHub Pages Free, professional Push to a Git repository
Netlify Free, auto-deploys Drag and drop or connect GitHub
Vercel Free, great for frameworks Connect to GitHub
Glitch Collaborative, beginner-friendly Edit in browser
Surge.sh Super simple CLI surge command

Version Control with Git

Professional version control (never lose work again):

# Initialize a repository
$ git init

# Stage all files
$ git add .

# Commit with a message
$ git commit -m "Initial site"

# Connect to GitHub and push
$ git remote add origin https://github.com/you/repo.git
$ git push -u origin main
The Pattern is Always the Same
  1. Work locally on your computer
  2. Test with Live Server
  3. Keep backups/versions
  4. Deploy to your chosen host
Once you learn this workflow, you can host anywhere.